Viewing 15 posts - 49,171 through 49,185 (of 59,099 total)
karthikeyan (7/17/2008)
I am not offending you, i am asking this question politely.
Jeff's Sample code:
--===== Right way to do a "Joined" update
UPDATE TableA
SET SomeTableAColumn...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 18, 2008 at 7:59 am
sqluser (7/18/2008)
Try this. It should work as per your result set.
CREATE TABLE tblPivot (fldDate DateTime, fldValue int)
INSERT INTO tblPivot (fldDate,fldValue)
SELECT '4/1/2008',4
UNION ALL
SELECT '4/3/2008',6
UNION ALL
SELECT '4/7/2008',9
UNION ALL
SELECT '4/2/2008',1
UNION ALL
SELECT '5/8/2008',4
UNION...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 18, 2008 at 6:24 am
My pleasure... thank you for the feedback. 🙂
--Jeff Moden
Change is inevitable... Change for the better is not.
July 17, 2008 at 11:50 pm
Vivien Xing (7/17/2008)
--Jeff Moden
Change is inevitable... Change for the better is not.
July 17, 2008 at 11:45 pm
Hari.Sharma (7/15/2008)
Hi Sol,Try this
DECLARE @a varchar(10),@b varchar(10)
SET @a='1'
SET @b-2='1 '
if QUOTENAME(@a) = QUOTENAME(@b)
print 'True'
else
print 'False'
Seems like the easiest way to go to me! 😉
Now, the...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 17, 2008 at 8:06 pm
Generally speaking, if there aren't a lot of inserts and the clustered key puts the inserts near the logical end of the table, you can use a high fill factor...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 17, 2008 at 7:51 pm
Ian Scarlett (7/17/2008)
ISQL/W is actually Query Analyzer.ISQL is the earlier command line interface for doing the same thing as Query Analyser (i.e running queries and getting back results)
Not true... ISQL...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 17, 2008 at 7:46 pm
Its real hard to troubleshoot a problem without any code or data examples... please see the link in my signature line below.
--Jeff Moden
Change is inevitable... Change for the better is not.
July 17, 2008 at 7:41 pm
A calendar table is good to have. Or, you can do it with a simple formula and then subtract the holidays listed in a Holiday table. The following...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 17, 2008 at 7:30 pm
Very nicely done! The 1st and 2nd articles take a lot of the mystery out of this task and really make it simple. I've not had to do...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 17, 2008 at 6:39 pm
What if you boss asked you to work on your "soft" skills.
I'd take the nice Oak bat home and bring in a nice "soft" Pine bat 😛
I'm a teacher at...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 17, 2008 at 2:29 pm
blandry (7/17/2008)
If there is not enough cache on hand and both will eventually hit TempDB - is the only advantage that Table variables dont hit it explicitly to start?
Not quite...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 17, 2008 at 2:15 pm
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
Viewing 15 posts - 49,171 through 49,185 (of 59,099 total)