Viewing 15 posts - 1,606 through 1,620 (of 5,504 total)
either
SELECT TOP 2 ORDER BY dischargedate DESC
or a CTE using
ROW_NUMBER() OVER(PARTITION BY id ORDER BY dischargedate DESC) AS row
and a query using WHERE row<=2
May 3, 2011 at 2:10 pm
It shouldn't cause a performance issue since the XML structure is neither complicated nor large in size.
The best way to know is to test it. 😉
May 3, 2011 at 11:07 am
Depending on the Server version you're using you could either use OpenXML or XQuery.
You might want to have a look at Jacob Sebastians blog
If you can't find a solution please...
May 2, 2011 at 2:18 pm
It looks like a FiFo stock problem as discussed in one of Phil Factor SQL Speed Phreak Competitions.
You might want to have a look at Daven Ballantynes answer. The main...
May 1, 2011 at 9:10 am
first of all: THANK YOU for providing ready to use sample data. EXCELLENT job!!
Regarding the data itself:
How do you assign a box to a PO? E.g. item01, box01 could be...
April 30, 2011 at 5:18 pm
Another issue you need to consider:
How are you going to prevent a user adding a company "My company", if there is already a company named "My company Inc." together with...
April 30, 2011 at 8:57 am
Slightly different over here in Germany: if a holiday falls on a Sunday (as it happens with May 1st this year), we won't get a public holiday during the week...
April 30, 2011 at 7:35 am
Please read the first article referenced in my signature and post table def and sample data in a ready to use format together with your expected result set.
As an alternative...
April 30, 2011 at 7:29 am
removed. doesn't work under a different test condition...
April 30, 2011 at 2:29 am
You can't use a DROP TABLE statement using a variable unless you're using dynamic sql.
Are you familiar with dynamic SQL? What skill level do you have?
April 30, 2011 at 2:06 am
You could go through some of the questions asked (and answered) in the SS2K5 Performance forum (http://www.sqlservercentral.com/Forums/Forum360-1.aspx).
Or search for "performance tuning" on this site to find numerous questions. Try to...
April 29, 2011 at 2:07 pm
April 28, 2011 at 1:53 pm
If your original data include a column with a sequential number ,you could avoid the sort caused by ROW_NUMBER() and just use the very last part (the self-join). This should...
April 28, 2011 at 10:56 am
Vedran Kesegic (4/27/2011)
tinnusqlserver (4/27/2011)
how can i join the 'table variable' with the 'matters' table to delete duplicates
I would rather use a temp table than a table variable, because table variable...
April 27, 2011 at 4:39 pm
Viewing 15 posts - 1,606 through 1,620 (of 5,504 total)