Viewing 15 posts - 58,486 through 58,500 (of 59,053 total)
Nope... it's not... SET ls_action=0 will fail in the absence of other code. You either have to declare ls_action as variable (don't forget to add the @ sign) or you have...
December 30, 2005 at 12:37 pm
Daniel,
The other thing you may not be aware of is that if you update ANY column in the table that has a timestamp column, the TimeStamp will change. I think...
December 30, 2005 at 12:27 pm
Ok, thanks... you sure you wanted the duplication in the #QueryTable? Could get pretty nasty if you have lots of rows...
December 30, 2005 at 12:05 pm
Steve and Ken...
Yup, I knew that... I just thought that since Trigger recommended it as a T_SQL command, there might be some neat trick he was using to use it...
December 30, 2005 at 12:02 pm
Yup, your method works just fine (but what a pain with all of those indexes). And, deleting the "dupes" probably wouldn't be any faster because of the indexes.
And, to answer...
December 29, 2005 at 10:30 pm
Trigger,
How do you use BCP from T-SQL without using xp_CmdShell which is normally off limits to all but those members of the SA role?
December 29, 2005 at 10:15 pm
Thgamble1,
Carl has the correct answer here... did it work for you or do you still have a question?
December 29, 2005 at 10:07 pm
It would be real nice if you posted the function that work's so great... thanks.
December 29, 2005 at 11:15 am
Andrew, you're making a classic error... you are doing traditional rounding to 3 places before you are attempting the bankers rounding....
Just like the example of 3.445657545 being rounded to 3.45...
December 29, 2005 at 7:04 am
Carl wrote: "For 3.455, since the third decimal position value is 5 and the second decimal position is odd, this should truncate, not round. The expected results should be 3.45...
December 29, 2005 at 6:35 am
BWAAA-HAAAA-HAAAA-HAAA! Snooorrtt! OOOOOOOHHHHH-WEEEEEE! UNBELIEVABLE!!!! WE DON' NEED NO STINKIN' LOOPS... WE DON' NEED NO STINKIN' UDF. WE DON' NEED NO STINKIN' CALCULATIONS!!!! SQL SERVER HAS A FUNCTION TO DO BANKERS...
December 28, 2005 at 8:57 pm
As a DOS command, you can use OSQL -L
You could route that to a file using OSQL -L > somefilename
December 28, 2005 at 8:11 pm
AND, dont' feel too alone on that MONEY v.s. DECIMAL thing... I just changed to the DECIMAL data type on my attempted code and ALL the answers became 3.45
December 28, 2005 at 9:45 am
Ryan,
Your code works great so long as the MONEY data type is used to hold the number and is probably appropriate for the Banker's Rounding problem because one must assume...
December 28, 2005 at 9:37 am
Ryan, You are correct. It doesn't work correctly for 3.445657545.
It rounds to 3.44 instead of 3.45 as you stated. Thanks for the catch...
December 28, 2005 at 9:18 am
Viewing 15 posts - 58,486 through 58,500 (of 59,053 total)