Viewing 15 posts - 49,186 through 49,200 (of 59,102 total)
If you're really going to consider performance and storage, then stop thinking Cursors or While loops and stop thinking about a 5 million row temp table. Make a permanent...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 17, 2008 at 1:38 pm
ALI (7/17/2008)
Thanks for your comments.I did solve above issue and got stuck with other. As I have tight production deadlines, I am going for cursor in a stored procedure.
See...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 17, 2008 at 12:15 pm
karthikeyan (7/17/2008)
What size column do you thing NAME = '' will make?
Jeff,
Thanks for highlighting this area.
I have executed my previous code.
select distinct ID, Name =''
into #t1
from T
update #t1
set #t1.Name...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 17, 2008 at 12:11 pm
tony.sawyer (7/17/2008)
The solution provided used a case statement where the...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 17, 2008 at 12:08 pm
I'm in the process of writing an article about Crosstabs and Pivots... hope to finish it soon but one of the things I'm finding out in testing is that, except...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 17, 2008 at 6:04 am
Jeff Moden (7/16/2008)
karthikeyan (7/16/2008)
Jeff,how about my code ?
What size column do you thing NAME = '' will make? Also, look at the update... which NAME shall it use to...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 17, 2008 at 5:54 am
The best thing for this is a "Crosstab Report"... and it's easier than the PIVOT operator...
--===== Create and populate a test table
-- THIS IS NOT...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 16, 2008 at 9:17 pm
This is right on the border line of me thinking this is some type of homework... please post a decent try!
I will give you a hint, though... lookup GROUP BY.
--Jeff Moden
Change is inevitable... Change for the better is not.
July 16, 2008 at 5:35 pm
karthikeyan (7/16/2008)
which one is good when we think performance ?
Try it... let us know...
--===== Create and populate a 1,000,000 row test table.
-- Column "RowNum" has...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 16, 2008 at 8:45 am
karthikeyan (7/16/2008)
Jeff,how about my code ?
What size column do you thing NAME = '' will make? Also, look at the update... which NAME shall it use to do the...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 16, 2008 at 8:40 am
RyanRandall (7/14/2008)
update #TEST set Descr = replace(replace(replace(Descr, ' ', '¬ '), ' ¬', ''), '¬', '') where Descr like '% %'
(Where...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 16, 2008 at 8:07 am
Ok... now that I've had a bit of coffee... 😛
In the original problem posted, San didn't care about which name was returned so just use the MIN or Max name...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 16, 2008 at 7:37 am
Dugi (7/16/2008)
Hi Jeff!Your code here just selecting and ordering asc the data inside the table it doesn't do any elimination of duplicate records!
Can you explain little bit this!
Dugi
I believe that...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 16, 2008 at 7:17 am
Dugi (7/16/2008)
Hi Jeff!Your code here just selecting and ordering asc the data inside the table it doesn't do any elimination of duplicate records!
Can you explain little bit this!
Dugi
Heh... Sure! ...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 16, 2008 at 7:15 am
I wouldn't recommend that way... it has a While loop in it and a couple of other performance related problems. Try the following, please... it also explains how it...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 15, 2008 at 11:45 pm
Viewing 15 posts - 49,186 through 49,200 (of 59,102 total)