Viewing 15 posts - 451 through 465 (of 600 total)
The parameter is a varchar (a string), and must be converted to an int for his calculation.
So it can't have / in it.
assuming he wants year last (is start date...
July 11, 2011 at 7:18 pm
Charles Deaton (7/11/2011)
July 11, 2011 at 2:53 pm
Heh, my first time bit of practice using UNPIVOT, and I discover that I should never seldom use it.
Now I have to find an excuse to practice using CROSS APPLY.
July 8, 2011 at 1:46 pm
opc.three (7/8/2011)
SQLkiwi (7/8/2011)
opc.three (7/8/2011)
Would you mind grabbing the whole chunk of code from my last post and posting the results from running it on your machine?
16-core test machine:
---------------------------------------------------------------------------
build temp tables
---------------------------------------------------------------------------
String...
July 8, 2011 at 1:11 pm
opc.three (7/8/2011)
Nevyn (7/8/2011)
I did misunderstand. I thought you were talking about duplicates in terms of records, not hobbies. Duplicate hobbies are allowed.
Do you want to show 4 nulls if there...
July 8, 2011 at 11:58 am
I did misunderstand. I thought you were talking about duplicates in terms of records, not hobbies. Duplicate hobbies are allowed.
Do you want to show 4 nulls if there is a...
July 8, 2011 at 10:26 am
Jeff Moden (7/7/2011)
July 8, 2011 at 7:38 am
I think you misunderstood the question, Mike. They are asking if the same hobby (Tennis in the example) appears twice in the four possible hobby records whether you want...
July 8, 2011 at 6:48 am
Is the query above correct? Why would you link the tables on the two identity rows?
Was that meant to be "inner join EMaster a on a.sid = b.salesofficerid"??
Anyway, the answer...
July 7, 2011 at 10:14 pm
Please someone tell me what I did wrong:
You had a typo in your solution (used hobby1 twice from the first table), but that wouldn't effect the performance.
But doesnt this build...
July 7, 2011 at 8:51 pm
My first instinct would be to create a nonclustered index on EvidenceLetter in Podrobnosti, and then populate the form using a stored procedure that takes EvidenceLetter as input and performs...
July 7, 2011 at 1:30 pm
Yeah, I'm not sure if he thought he'd get 6 or 7 different working answers.
July 7, 2011 at 12:25 pm
The string manipulation is probably the fastest.
I wanted to try the UNPIVOT/PIVOT just for the heck of it.
Using Opc.Three's test setup, here is what I did first:
;WITH OneTableCTE AS
(
SELECTa.id,
a.hobby1...
July 7, 2011 at 11:02 am
gary.proctor (7/6/2011)
Thank you for the immediate responses.
Unfortunately I abreviated the example for the sake of space.
While MIN & MAX solution will work nearly every time...
It is possible...
July 6, 2011 at 1:43 pm
Viewing 15 posts - 451 through 465 (of 600 total)