Viewing 15 posts - 241 through 255 (of 414 total)
What do you do if there is a tie for 5th place, i.e. two states with the same tot_marks, ranked 5th and 6th? Which one should be in the top...
September 16, 2005 at 12:57 am
I should add that if an item can appear more than once in an item composition, or in a product, then my approach will fail... This can be fixed as well,...
September 16, 2005 at 12:46 am
Chief Executive comes from Departments.Department, which cannot be (pre)added to an int. But I agree, the error message could be better.
September 15, 2005 at 7:09 am
Use convert(nvarchar, Requests.RequestID) instead. Does it change anything?
September 15, 2005 at 6:55 am
What is the datatype of Requests.RequestID and why don't you use isnull for this?
September 15, 2005 at 6:50 am
Select results into tblTest as above, then copy everything to another table (with an extra column) while populating the extra column. I don't think there is an easier way...
September 15, 2005 at 1:18 am
I thought about it at home and came up with the following. As Noel, I haven't thought much about performance. Maybe you should consider making dt1, dt2 and dt3 real...
September 15, 2005 at 1:13 am
OK, I understand what you want, it's a bit complicated
I have to leave now, I will have a look at it tomorrow, if...
September 14, 2005 at 8:46 am
Well, what I was trying to say was that I don't see how the result arrives - and that Remi is missing group by item_id in his first suggestion
September 14, 2005 at 8:07 am
Sure, thanks
September 14, 2005 at 8:06 am
Then item_id 8 should correspond to 1, shouldn't it?
September 14, 2005 at 8:03 am
Or check this thread:
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=216410
I didn't know Remi's solution when I posted my solution, and Remi normally has the fastest solution, but just in case....
September 14, 2005 at 2:07 am
Sure, but that may not be what you want... But the columns probably have the same datatype, and then your solution is definitely preferrable.
September 13, 2005 at 8:03 am
I guess I do now
But your solution doesn't work if columnA is an int column and columnB is a varchar column... it fails if @ReportType='B'
September 13, 2005 at 7:57 am
Viewing 15 posts - 241 through 255 (of 414 total)