Viewing 15 posts - 54,931 through 54,945 (of 59,072 total)
First, no need for a cursor in triggers... ever! You can simply join to either the INSERTED table, the DELETED table, or both.
Second, I recommend that you do NOT log...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 21, 2007 at 6:01 pm
Ya gotta love those that don't even try the suggestions given... guess these "experts" can just look and see "bad code" ![]()
I'm not sure...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 21, 2007 at 5:51 pm
Last, but not least... security... everybody can make a table in TempDB... might not be true on the "given" DB for whatever user the sproc is logged in as...
AND, TempDB...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 21, 2007 at 5:47 pm
No, pretty sure there's nothing built in... you'd have to do a SELECT INTO a temp table and then read the datatype from the columns something like this...
...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 21, 2007 at 5:17 pm
I agree with Rob and Alex... I'd also like to add that using something that you know "could" fail but hasn't so far (UDF_ID function) is a bit like sitting...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 21, 2007 at 7:41 am
So... if there are, say, 7 dates that are all where the startdate of the next row is 1 greater than the enddate of the previous row like this...
1;AA;20070921;20070922;10
1;AA;20070922;20070923;20
1;AA;20070923;20070924;30
1;AA;20070924;20070925;40
1;AA;20070925;20070926;50
1;AA;20070926;20070927;60
1;AA;20070927;20070928;70
... would the...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 21, 2007 at 7:05 am
The problem with selecting either the MAX or the TOP 1 DESC, even in the presence of the read locks that Andy included in the code, is that you only...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 21, 2007 at 6:53 am
Ok, Cees... I was just making sure that you had everything that you needed. And Lowell's snippet above will take care of the zeros...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 21, 2007 at 5:32 am
Wow... let's triple the work the server does... some vendors just don't get it...
Thanks for the feedback, Jim...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 20, 2007 at 8:57 pm
Heh... I've gotta agree with that part... we've gotten more done on cocktail napkins that we have at such seminars.
Beer... the greatest "networking" tool there is ![]()
--Jeff Moden
Change is inevitable... Change for the better is not.
September 20, 2007 at 8:53 pm
Just don't forget the "-s" (column separator) flag... might want to set it to -s"" so there is no separator...
And, yes, you could use BCP for a fixed file format......
--Jeff Moden
Change is inevitable... Change for the better is not.
September 20, 2007 at 8:47 pm
... or....
You could import whole lines into a very wide column and split them there using a split function...
... or ...
You could do the same but a bit different... import...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 20, 2007 at 8:39 pm
You bet, folks... thanks for the feedback.
--Jeff Moden
Change is inevitable... Change for the better is not.
September 20, 2007 at 8:31 pm
Heh... no, Greg... not about good "lurkers" like you
... it's about some folks who will never "get it".
--Jeff Moden
Change is inevitable... Change for the better is not.
September 20, 2007 at 8:23 pm
Thanks John and Rog... much appreciated!
You may be using the wrong layer to do database things in. The type of activety that you've both described should probably be done in...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 20, 2007 at 8:16 pm
Viewing 15 posts - 54,931 through 54,945 (of 59,072 total)