Viewing 15 posts - 6,376 through 6,390 (of 10,144 total)
I have to agree with Cadavre here.
It's not just the performance in this case, rCTE's are expensive and shouldn't be used unless they're doing far more work than simply...
March 13, 2012 at 4:42 am
The recursive CTE is used for generating rows - and it's a massively expensive way to do this. In 2K8 or higher, row constructors would be much cheaper
VALUES((1),(2),...)
In 2k5,...
March 13, 2012 at 3:09 am
Jeff Moden (2/13/2012)
ChrisM@home (1/18/2012)
jennigirl (1/18/2012)
February 15, 2012 at 1:51 am
Cadavre (12/9/2011)
ChrisM@Work (12/9/2011)
Although it's less elegant than Cadavre's code, it's likely to perform a little faster.
Agreed 100%. Generally I use cross-tab queries to pivot data, I showed the syntax for...
December 9, 2011 at 8:49 am
The method you are using - correlated subqueries - is similar in layout to a cross-tab, but check out the real thing for performance:
SELECT
ListingID,
Photo01 = MAX(CASE WHEN Priority =...
December 9, 2011 at 8:37 am
Divine Flame (12/9/2011)
GilaMonster (12/9/2011)
Divine Flame (12/9/2011)
What is the average row cont in sys.dm_io_pending_io_requests ??On SQL 2000?
lol :-D, No way . He has not mentioned that he is using SQL...
December 9, 2011 at 4:05 am
Can you confirm that you are using SQL Server 2000?
Have a quick read of the link "here" in my sig, it will help you frame your question for a better...
December 9, 2011 at 4:04 am
SQLRNNR (12/8/2011)
ChrisM@Work (12/8/2011)
SQLRNNR (12/7/2011)
Took the plunge on 70-451Nice one, Jason!
Thanks
Was the braindump useful?:-D
It was just small enough to fit :hehe:
December 9, 2011 at 3:17 am
You could use the OUTPUT clause:
DROP TABLE #MemberEnrolments
CREATE TABLE #MemberEnrolments (MemberID INT NOT NULL, EnrollmentID INT NOT NULL, enrolmentStartDate DATE NOT NULL, primaryflag BIT)
ALTER TABLE #MemberEnrolments --WITH NOCHECK
ADD CONSTRAINT...
December 8, 2011 at 10:24 am
mario.balatellii (12/8/2011)
Or may be i will have sql job which will transfer the data into a table in a database. What...
December 8, 2011 at 6:24 am
Probably easiest if you run the results into a local temp table...
SELECT ... INTO #Temp FROM ...
December 8, 2011 at 5:58 am
-- change this
update TestA set TestA.Column5 = TestB.Column5
from TestA inner join TestB
on TestA.Column1 = TestB.Column1
and TestA.column2 = TestB.Column2
and TestA.Column3 = TestB.Column3
-- to this
SELECT <<primary key from table a>>, b.Column5
INTO #Temp
FROM...
December 8, 2011 at 4:43 am
SQLRNNR (12/7/2011)
Took the plunge on 70-451
Nice one, Jason!
December 8, 2011 at 4:01 am
mario.balatellii (12/7/2011)
thanks for this Chris. I will try this at work tomoro and let you know how it goes. Much appreciated
You're welcome Mario. You will need to change the name...
December 7, 2011 at 10:12 am
Crosstab version:
SELECT
[Type]= MAX(CASE WHEN en.[Entity name] = 'Type' THEN Attribute END),
[Bank name]= MAX(CASE WHEN en.[Entity name] = 'Bank name' THEN Attribute END),
[Merchant code] = MAX(CASE WHEN en.[Entity...
December 7, 2011 at 10:07 am
Viewing 15 posts - 6,376 through 6,390 (of 10,144 total)