Viewing 15 posts - 1,246 through 1,260 (of 4,081 total)
You can use a WHERE clause with an UPDATE statement in T-SQL.
UPDATE Table
SET database_name = db_name()
WHERE database_name IS NULL
December 7, 2010 at 5:21 pm
Unless the table has a defined IDENTITY column, or you've come up with your own sequencing scheme, the system has no way of magically tracking which rows were inserted last.
Even...
December 7, 2010 at 5:09 pm
Let's make sure the logic is working as expected first.
Try adding a little debug code just before you send the email. Write out...
December 7, 2010 at 2:54 pm
I believe you are confusing EXEC @sql with "parameterrized dynamic SQL" which requires that you EXEC sp_executeSQL.
If you want to use EXEC by itself,...
December 7, 2010 at 2:50 pm
Jeff Moden (12/6/2010)
The Dixie Flatline (12/6/2010)
December 7, 2010 at 2:41 pm
If I understand you correctly, you always want the start and end dates from the prior month, regardless of the starting and ending date that you provide. ...
December 6, 2010 at 10:53 am
To all the people in the U.S.: Have a happy Thanksgiving.
To everyone else. Have a happy Thursday. 😀
November 24, 2010 at 3:31 pm
Yes, it will mean less space and better I/O.
As has been pointed out, this approach makes you responsible for remembering to divide by 10 forever. If you...
November 24, 2010 at 9:10 am
I can't get this out of my head now.... and I can't stop myself from posting this.
Instead of vuvuzelas for soccer, fans could start carrying bokkens to rugby matches in...
November 19, 2010 at 10:01 am
GilaMonster (11/18/2010)
CirquedeSQLeil (11/17/2010)
November 18, 2010 at 3:49 pm
Paul, thanks for the reply. I understand now.
November 12, 2010 at 7:44 am
Paul, I ran the code and saw the log entries, but I wasn't doubting his word.
Let me rephrase the question: What is the purpose...
November 11, 2010 at 10:27 pm
You're very tiny! (j/k)
Nice shades though...
November 11, 2010 at 10:24 pm
Congratulations, Wayne. Applause! Thunderous applause
Let me ask what logging takes place with table variables, since they are not affected by rollbacks.
November 11, 2010 at 9:43 pm
Viewing 15 posts - 1,246 through 1,260 (of 4,081 total)