Viewing 15 posts - 57,331 through 57,345 (of 59,067 total)
There would certainly appear to be a fly in the ointment
... thanks for the catch and sorry for the mistake folks... I'll see...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 25, 2006 at 5:41 pm
I'm thinking it just might be something else because the following works just fine and without any error...
select datediff( hh, 'May 17 2002 9:53', 'May 18 2002 9:53')
--Jeff Moden
Change is inevitable... Change for the better is not.
October 25, 2006 at 5:19 pm
Don't worry, Gail... we considered the source ![]()
![]()
![]()
--Jeff Moden
Change is inevitable... Change for the better is not.
October 25, 2006 at 5:12 pm
| ...but when doing that I must maintain the sequence of un-duplicated numbers |
Commando...
I think the quote above explains it...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 25, 2006 at 5:06 pm
A good ol' batch file that uses OSQL or BCP would be easy enough... and, then, the user could provide whatever filename they wanted as a parameter.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 24, 2006 at 8:04 pm
Choose wisely and carefully... you get one clustered index per table. And, just because you have a clustered index on a table does not guarantee it will be used... you...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 24, 2006 at 8:00 pm
If the naming differences are that bad, generate scripts for all the views from EnterPrise Manger, drop all the views, recreate the views using the script.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 24, 2006 at 7:56 pm
This should do it... don't worry about the couple of strings you see... this is still pretty darned fast and they make it independent of the @@DATEFIRST setting... (you can...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 24, 2006 at 6:16 pm
Sorry... had posted a solution here (and deleted it) for hours that didn't take into account days that were on the weekends... I'll be right back with the correction.... 
--Jeff Moden
Change is inevitable... Change for the better is not.
October 24, 2006 at 6:05 pm
This will give you whole days... modify the "ends" of the range to do hours... also, not affected by @@DATEFIRST settings... very fast... very simple...
SELECT (DATEDIFF(dd,@StartDate,@EndDate)+1)
-(DATEDIFF(wk,@StartDate,@EndDate)*2)
...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 24, 2006 at 5:38 pm
Also, have you looked into using sp_AddLinkedServer... it, in fact, supports links to DB2. See Books Online,
--Jeff Moden
Change is inevitable... Change for the better is not.
October 24, 2006 at 4:13 pm
You could use Sp_ExecuteSQL but then you'd still end up with a table variable that cannot be made to use statistics...
If it were me, I'd use a temp table instead...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 24, 2006 at 4:09 pm
Sorry, Remi... that wasn't directed at you... I got so ticked
at the mere suggestion that such a simple data manipulation be done...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 24, 2006 at 7:49 am
Ok... I know... "put up or shut up, Jeff"... fine
Let's see you do it any simpler in an app 
--Jeff Moden
Change is inevitable... Change for the better is not.
October 24, 2006 at 7:20 am
I try to use my memory... but I forget... ![]()
--Jeff Moden
Change is inevitable... Change for the better is not.
October 24, 2006 at 6:08 am
Viewing 15 posts - 57,331 through 57,345 (of 59,067 total)