Viewing 15 posts - 1,291 through 1,305 (of 11,678 total)
What is your business logic? Why would you select (X,Y,60) and not (Y,X,60)?
December 5, 2014 at 12:35 am
nhimabindhu (12/4/2014)
December 4, 2014 at 3:10 am
vignesh.ms (12/3/2014)
1. What is the problem, why the optimizer goes with the index seek?
2. Do you need any...
December 4, 2014 at 2:56 am
Easiest option: dump records in a staging table. Then select again and use the ROW_NUMBER function to indicate duplicates. Everything with row number 1 goes into the unique table, all...
December 4, 2014 at 2:55 am
I had to Google this, because I did not understand at least 9 words from that question. 😀
Nice question, definately learned something.
December 4, 2014 at 1:19 am
Brandie Tarvin (12/3/2014)
What about the non-R2 version of SQL 2008? Does XE work with that? (And what is XE?)
eXtended Events
December 3, 2014 at 8:01 am
Nice question.
The original INSERT statement misses one quote though.
But I figured out this was a typo and it had no influence on the answer. 😎
December 3, 2014 at 12:23 am
Shiva N (12/2/2014)
Hi Mr. Eirikur EirikssonIts working fine and exactly it is what i need.
so thank you very much...
Do you also understand the code? If it crashes on your production...
December 3, 2014 at 12:19 am
WITH cte AS
(
SELECT
SALESMAN_ID
,ORDER_NO
,ORDER_TOTAL
,rnk = RANK() OVER (PARTITION BY SALESMAN_ID ORDER BY ORDER_TOTAL DESC)
FROM dbo.SYSOENT
WHERE ORDER_DATE >= '1/1/14'
)
SELECT TOP 3 SALESMAN_ID,ORDER_NO,ORDER_TOTAL
FROM cte
WHERE rnk <= 3
ORDER BY ORDER_TOTAL DESC;
December 2, 2014 at 7:35 am
Eirikur Eiriksson (12/2/2014)
😎
DECLARE @STR VARCHAR(100)='My name is Shiva';
DECLARE @XSTR VARCHAR(MAX) = 'SELECT(SELECT CHAR(32)+Y.XN FROM(SELECT ROW_NUMBER() OVER...
December 2, 2014 at 6:11 am
Use the excellent splitter function by Jeff Moden[/url] and use a space as the delimiter.
Sort the results in descending order and concatenate them back together[/url].
December 2, 2014 at 5:20 am
First thing that comes to mind is to compare the execution plans from both servers.
December 2, 2014 at 4:40 am
SQLAssAS (12/2/2014)
December 2, 2014 at 4:16 am
SQLAssAS (12/2/2014)
December 2, 2014 at 3:07 am
Viewing 15 posts - 1,291 through 1,305 (of 11,678 total)