Viewing 15 posts - 106 through 120 (of 330 total)
Although a little quirky, I think the proc should work fine - it seems to me that you've just missed the vendor restriction near the end...
SELECT File_Sequence_No FROM ZZ.T_ Hdr...
September 27, 2009 at 1:30 pm
Interesting - thanks for the info - I think I'll have to add it to my 'topics to read about' list 😀
September 27, 2009 at 1:23 pm
WILLIAM MITCHELL (9/27/2009)
That of course is a ridiculous example.
No, it's just a test that covers a few edge cases, and breaks every code sample you've posted.
If you've never seen something...
September 27, 2009 at 12:48 pm
Seeing as I don't have VB installed - would you just run it through the proc definition that I tested my solution with?
I.e. run this code
Dim SQL as String
SQL =...
September 27, 2009 at 10:29 am
You want to use a windowed aggregate for that.
Check out BOL for information on the OVER clause, paying particular attention to the partition by bit. There's some pretty detailed examples...
September 27, 2009 at 4:42 am
Sorry to be the bearer of bad news, but you can't do that easily at all. Not generically for any stored procedure, anyhow.
SysDepends / sys.sql_dependencies / sys.sql_expression_dependencies all just show...
September 27, 2009 at 4:36 am
I have also been toying with a regex based way to solve this problem - and, using the regex \/\*.*CREATE.*\*\/|--.*CREATE|(CREATE) in case insensitive mode then you could look for the...
September 26, 2009 at 6:54 pm
WILLIAM MITCHELL (9/26/2009)
Matt, I have been here in the forums for the past six years to help others. There is no need to make ignorant comments.
I don't think I've made...
September 26, 2009 at 6:09 pm
Jeff Moden (9/26/2009)
September 26, 2009 at 5:09 pm
Jeff Moden (9/26/2009)
That's why I like the SAN replication methods... set it and forget it...
Have you ever had any issues with that? Because we had an issue once where it...
September 26, 2009 at 4:49 pm
I'm quite aware how replace works 🙂
If you must go down the string replace route, then at least use a regex to match an undefined number of spaces, rather than...
September 26, 2009 at 12:49 pm
In that case, you've really got three options:
1) (easiest) Just replace 'CREATE PROC' with 'ALTER PROC' in the resulting string, and hope that it doesn't come across any procedures that...
September 24, 2009 at 9:06 am
Is there a particular reason you want to use ALTER as opposed to DROP then CREATE?
Do you have permissions you'd like to maintain?
As I said, changing CREATE statements to ALTER...
September 24, 2009 at 8:41 am
Sorry - I got completely the wrong end of the stick there! 😀
September 24, 2009 at 8:10 am
How would that handle a procedure which created another procedure dynamically?
e.g.
CREATE PROCEDURE stproc_CreateMyProc
AS
EXEC ('CREATE PROCEDURE stproc_MyProc as SELECT ''hello'' ')
September 24, 2009 at 6:31 am
Viewing 15 posts - 106 through 120 (of 330 total)