Viewing 15 posts - 57,136 through 57,150 (of 59,101 total)
I agree with SQLBill on many of the points he made. You might just be viewing things differently or incorrectly... post the CREATE TABLE statement for the target table... if...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 22, 2006 at 9:34 am
I agree with Vladan... spend some time with Books Online...
Although I think MONEY is the correct datatype to use here, using DECIMAL(10,2) won't kill you if you don't mind...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 22, 2006 at 9:20 am
I think you're making a big design mistake but it's your funeral... ![]()
PROCEDURE dbo --Jeff Moden Change is inevitable... Change for the better is not.
RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
Helpful Links:
How to post code problems
How to Post Performance Problems
Create a Tally Function (fnTally)
December 21, 2006 at 11:35 pm
Rajesh,
What feeds the proc you just posted? A GUI, a batch job, another proc? or ???
--Jeff Moden
Change is inevitable... Change for the better is not.
December 21, 2006 at 11:22 pm
While I'm looking at this, gotta ask... did you run the SELECT through the Index Tuning Wizard, yet?
--Jeff Moden
Change is inevitable... Change for the better is not.
December 21, 2006 at 11:09 pm
Rajesh!
Did you try it or what?
--Jeff Moden
Change is inevitable... Change for the better is not.
December 21, 2006 at 10:51 pm
David,
Just to add to what Andy has already said... your article has provoked some pretty good conversation. Don't ever let the occasional nasty comment deter you from writing these types...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 21, 2006 at 10:43 pm
The only reason why you think there is no performance problem on the UPDATE is because it is only updating 1 row at a time and you are comparing it's...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 21, 2006 at 10:28 pm
... and why on Earth are you using a
cursor? Do this set based...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 21, 2006 at 10:13 pm
The column is called "Month_of_file".... why are you looking for just one day? Try this as your WHERE clause to return rows for the month of September 2006....
--Jeff Moden
Change is inevitable... Change for the better is not.
December 21, 2006 at 10:07 pm
A slightly easier to see method... if "Value1" is a column name....
SELECT REPLACE(Value1,CHAR(9),'') AS Value1
FROM your table
"CHAR(9)" is the TAB character.
HOWEVER!!!! If you have such characters...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 21, 2006 at 9:59 pm
Serqiy is correct... the MONEY datatype is the way to go here... the MONEY datatype takes the same as a datetime... 8 bytes and gives you 4 decimal places to...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 21, 2006 at 9:54 pm
Almost correct... You don't need to do a different owner prefix... temp tables have scope by session only. You do not need to use a dynamic table name if the...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 21, 2006 at 9:43 pm
Why not post them here so we can all learn something? ![]()
--Jeff Moden
Change is inevitable... Change for the better is not.
December 21, 2006 at 2:54 pm
Martin,
If the Total_1 column is any of the integer datatypes and (so it appears) that the Total_1 column is a total number of minutes worked, you may be in for a...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 21, 2006 at 2:35 pm
Viewing 15 posts - 57,136 through 57,150 (of 59,101 total)