Viewing 15 posts - 41,716 through 41,730 (of 59,102 total)
Heh... Same here... abbreviated post. Looking back at it, I certainly could have made it more apparent that it was directed at the OP. Sorry.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 2, 2009 at 8:14 pm
BTW... you can also use a WHERE NOT EXISTS against a Tally table and it'll be fast as well. Just don't try the ol' outer join with a NULL...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 2, 2009 at 8:03 pm
Dave Ballantyne (10/2/2009)
select CASE
WHEN dateadd(year, datediff (year, d1, d2), d1) > d2
THEN datediff (year, d1, d2) - 1
ELSE datediff (year, d1, d2)
END as Age
I'll take...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 2, 2009 at 7:38 pm
Congrats on the book.
As a side bar, you should post more often... lot's of folks could use your help.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 2, 2009 at 5:28 pm
max-1156434 (10/2/2009)
i was just having the same problem. Weird thing is, I looked for the lines causing the problems, and copied a couple of "bad" ones and a couple of...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 2, 2009 at 5:25 pm
I'm not sure this will help but this is why I like BCP... you can tell it to put the bad lines of data in an isolation file.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 2, 2009 at 5:24 pm
The exe would first have to be in a directory where SQL Server has privs. Then, you should either add that directory to the permanent PATH or explicitly name...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 2, 2009 at 5:17 pm
Understood. But I don't believe one should make that assumption which is why I asked the question. Hopefully the OP will know.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 2, 2009 at 5:13 pm
All of the methods shown so far keep "ties" for the MAX if they are duplicated. Do you want to keep the ties?
--Jeff Moden
Change is inevitable... Change for the better is not.
October 2, 2009 at 4:29 pm
I agree with Wayne and I'll go a bit further. Study ALL of the functions in SQL Server. At least learn what they do so you know what...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 2, 2009 at 4:02 pm
It takes the one thing that so few are actually willing to give... time. Pouring over books and articles will certainly give you some good ideas (and bad ones,...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 2, 2009 at 3:29 pm
TheSQLGuru (10/2/2009)
--Jeff Moden
Change is inevitable... Change for the better is not.
October 2, 2009 at 3:11 pm
Matt Whitfield (10/2/2009)
--Jeff Moden
Change is inevitable... Change for the better is not.
October 2, 2009 at 3:05 pm
Sure... most of this code is just to setup the test. The last SQL paragraph is the GAP checker.
DROP TABLE #MyTest
GO
--===== Create and populate a 1,000,000 row test table.
...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 2, 2009 at 1:02 pm
Matt Whitfield (10/2/2009)
--Jeff Moden
Change is inevitable... Change for the better is not.
October 2, 2009 at 12:47 pm
Viewing 15 posts - 41,716 through 41,730 (of 59,102 total)