Viewing 15 posts - 51,796 through 51,810 (of 59,098 total)
ALZDBA (3/14/2008)
If our dev's would only apply the basic rules and also try to write their
code at least in two different ways,...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 14, 2008 at 8:09 am
Nick M. (3/14/2008)
The links to UPDATE are to the UPDATE() function, not the UPDATE statement syntax, which is 1 line above in the index. 🙂
Thanks for pointing that out, Nick....
--Jeff Moden
Change is inevitable... Change for the better is not.
March 14, 2008 at 8:01 am
David McKinney (3/14/2008)
Very good article.I just think RBAR would catch on more, if it were pronounced AR-BAR. (Sorry 😉 )
Maybe "our Bar" would work even better 😀
--Jeff Moden
Change is inevitable... Change for the better is not.
March 14, 2008 at 7:55 am
Zarko Jovanovic (3/14/2008)
what about this:update table1
set table1.column1 = #table.column1, table1.column2 = #table.column2
from table1, #table
where table1.pk=#table.pk
That's fine because the table being updated is in the FROM clause and is properly joined......
--Jeff Moden
Change is inevitable... Change for the better is not.
March 14, 2008 at 7:54 am
Heh... a friend of mine gave me a lapel button that says "I've survived damned near everything!" If your under 40, it's your turn and I'll be happy to...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 14, 2008 at 12:06 am
I believe you also need to do a DBCC FREEPROCCACHE before a DBCC DROPCLEANBUFFERS if you trully want to make sure the execution plan is cleared.
--Jeff Moden
Change is inevitable... Change for the better is not.
March 13, 2008 at 11:49 pm
Dang... I thought for sure it stood for "Customers Test Problems" 😛
--Jeff Moden
Change is inevitable... Change for the better is not.
March 13, 2008 at 11:44 pm
The reason you're getting the file does not exist error is probably because of permissions. What ever user you SQL Services start up as, must be able to "see"...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 13, 2008 at 11:24 pm
Why not? VARCHAR MAX holds 2 billion + characters...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 13, 2008 at 10:44 pm
Indexed multi-table view... multi-table SELECT... which one will you call UPDATEable? Neither in all likely hood. An update would have to be something separate... paging isn't used to...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 13, 2008 at 10:37 pm
That would be correct (about the XP's in 2k). Didn't mention those because didn't think they would apply here.
--Jeff Moden
Change is inevitable... Change for the better is not.
March 13, 2008 at 10:34 pm
Matt beat me to it (more often than not, lately 😉 ) OUTPUT command in 2k5 will do it just fine.
--Jeff Moden
Change is inevitable... Change for the better is not.
March 13, 2008 at 10:33 pm
If it's for a report, why not just leave it as NText all the way through?
--Jeff Moden
Change is inevitable... Change for the better is not.
March 13, 2008 at 10:25 pm
If you don't mind the "pivot"...
SELECT
SUM(CASE WHEN DATEDIFF(dd, AsOfDate, GETDATE()) BETWEEN 1 AND 30 THEN 1 ELSE 0 END) AS [1-30],
SUM(CASE...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 13, 2008 at 10:17 pm
I really want to know why you're formatting numbers in SQL... that should be done in the GUI if there is one... and it looks like there is one. 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
March 13, 2008 at 10:05 pm
Viewing 15 posts - 51,796 through 51,810 (of 59,098 total)