Viewing 15 posts - 556 through 570 (of 650 total)
Christian,
The use of variables in Update statements has always been supported by Microsoft. The full syntax for the original Transact SQL Update statement is...
[font="Courier New"]
update [[database.]owner.]{table_name | view_name}
...
January 31, 2008 at 5:17 am
Yes, I'd definitely agree that the 'Quirky update' approach is the right one. I've always used an 'order by' but never tried clustered index/hints to force the order. It seems...
January 31, 2008 at 1:06 am
I spent several years advising a large international manufacturing company on their software-purchasing strategy. It always amazed me how far the software companies, including Microsoft, misunderstood our core requirements. In...
January 30, 2008 at 2:09 am
Lowell,
Thanks so much for noticing. Yes, I wrote the IFCODE version just because I got so damned frustrated with posting SQL code into the new forum software (nothing anyone could...
January 25, 2008 at 10:17 am
I suppose it would have to be renamed the SAMP stack, once Sun has done its marketing work. I've always thought of MySQL as the database for people who dislike...
January 21, 2008 at 2:21 am
This one would catch both nulls and empty strings, I think.
[font="Courier New"]
SELECT CASE WHEN COALESCE(A.NAME, '') = '' THEN 'unknown'
ELSE A.NAME
END,
A.age
FROM names A
ORDER BY CASE WHEN COALESCE(A.NAME, '') = '' THEN...
January 17, 2008 at 4:39 am
I think that the derived table you illustrate is the best, safest, and most efficient method. I'd be really pleased to be proved wrong..
January 17, 2008 at 4:19 am
There is no message. What you see is generated by SSMS/QA. you can check the return code from the stored procedure in VBS if you want to check for the...
January 8, 2008 at 12:32 pm
if you just run it on a list of servers and databases in SQLCMD. Then all your errors and status messages can be diverted into one file each. No problems.
e.g.
--connect...
January 7, 2008 at 7:51 am
Cor. I remember SQL Server 2000
You can still use the same trick, but the code ain't quite as pretty. In fact it isn't at all pretty. Ken Henderson showed how...
January 6, 2008 at 2:36 am
No Jeff. You don't need a cursor for this if you have varchar(MAX). Here is some code that puts all the database users for all the databases in a server...
January 5, 2008 at 4:09 pm
Jeff,
It. requires three files and thought it was a bit too long to write up for a Forum entry. The reason I did it was that, by coincidence, Robyn and...
January 5, 2008 at 10:55 am
I've just done it in SQLCMD-mode of SSMS, and it works a treat. Normally, doing a script against a number of servers, getting the non-result stuff in SQLCMD is...
January 5, 2008 at 2:42 am
We've hijacked a thread!
Yes, my head is swimming. I thought this thread was all about being asked about date calculations during an interview. It is lucky we don't know...
January 3, 2008 at 9:34 am
Sorry, I' thought I'd understood that you wanted to save your calculations in the table. Robyn's article would show you how to do that. If you're not quite sure how...
January 3, 2008 at 2:43 am
Viewing 15 posts - 556 through 570 (of 650 total)