Viewing 15 posts - 1,006 through 1,020 (of 5,843 total)
Please help us help you by providing create table statements and insert statements to set up your sample data. Then we can write a query based of those things and...
May 28, 2016 at 9:02 am
Eirikur Eiriksson (5/28/2016)
santiagoc93 (5/27/2016)
select customerId, window, product, sales,( Case when count(sales) over(partition by customerid order by customerid) >0 then 1 else 0 end)as class
from #example
Very nice!
😎
The addition...
May 28, 2016 at 9:01 am
There is a good bit to a SQL Agent job's execution from a security standpoint, especially a backup one, which needs access to external resources such as a directory to...
May 27, 2016 at 1:37 pm
Alan.B (5/27/2016)
TheSQLGuru (5/27/2016)
ChrisM@Work (2/24/2015)
... Two omissions stood out however - the cost of recompiling, ...
I will jump through hoops to trade CPU ticks to avoid disastrously bad plans (and the...
May 27, 2016 at 1:28 pm
David.Poole (5/27/2016)
The problem...
May 27, 2016 at 12:48 pm
ChrisM@Work (2/24/2015)
... Two omissions stood out however - the cost of recompiling, ...
I will jump through hoops to trade CPU ticks to avoid disastrously bad plans (and the horrible IO...
May 27, 2016 at 12:11 pm
I don't have time to wade through all that code right now, but are you actually using the OFFSET clause?? Look it up in Books Online if not.
May 27, 2016 at 11:11 am
SIGN is one of the things used in the '60s to develop characteristic functions (the precursor to the modern CASE statement), which allowed incredibly powerful data processing in a single...
May 27, 2016 at 11:09 am
beaudamore (5/27/2016)
I have followed your pattern somewhat and gone with CTEs to gather the...
May 27, 2016 at 11:04 am
This could be quite a bit more efficient. That COUNT gets especially expensive as the number of matching rows goes up.
SELECT *,
CASE...
May 26, 2016 at 2:49 pm
Thanks for the setup stuff. But in the future please make sure it works. 😀
Note I don't think this code will work correctly if a driver has more than 2...
May 26, 2016 at 11:47 am
A) If the report queries are finishing so quickly then NOTHING you do to "make them go faster" will help, right? That 7 minutes OUTSIDE SQL Server has to be...
May 26, 2016 at 11:26 am
Brandie Tarvin (5/26/2016)
May 26, 2016 at 10:41 am
I MUCH prefer to do my dynamic SQL this way. Now I don't have to worry about if it is 1, 2, 3, N stupid single quotes to make the...
May 26, 2016 at 6:36 am
Viewing 15 posts - 1,006 through 1,020 (of 5,843 total)