Viewing 15 posts - 886 through 900 (of 2,462 total)
Alan.B (3/30/2016)
ScottPletcher (3/30/2016)
Alan.B (3/30/2016)
ScottPletcher (3/30/2016)
Alan.B (3/29/2016)
Lastly, ditto the last Thursday of the month:
SET STATISTICS IO ON;
PRINT 'Old way:';
SELECT DISTINCT MAX([Date]) OVER (PARTITION BY [Year],[MonthName],[WeekdayName]) AS [Date]
FROM ...
-- Itzik Ben-Gan 2001
March 30, 2016 at 8:14 pm
ScottPletcher (3/30/2016)
Alan.B (3/30/2016)
ScottPletcher (3/30/2016)
Alan.B (3/29/2016)
Lastly, ditto the last Thursday of the month:
SET STATISTICS IO ON;
PRINT 'Old way:';
SELECT DISTINCT MAX([Date]) OVER (PARTITION BY [Year],[MonthName],[WeekdayName]) AS [Date]
FROM dbo.itvf_CALENDAR('01/01/2014','12/31/2014')
WHERE...
-- Itzik Ben-Gan 2001
March 30, 2016 at 1:34 pm
ScottPletcher (3/30/2016)
Alan.B (3/29/2016)
Lastly, ditto the last Thursday of the month:
SET STATISTICS IO ON;
PRINT 'Old way:';
SELECT DISTINCT MAX([Date]) OVER (PARTITION BY [Year],[MonthName],[WeekdayName]) AS [Date]
FROM dbo.itvf_CALENDAR('01/01/2014','12/31/2014')
WHERE ...
-- Itzik Ben-Gan 2001
March 30, 2016 at 11:17 am
girl_bj (3/29/2016)
Is there any way that...
-- Itzik Ben-Gan 2001
March 29, 2016 at 10:50 pm
Nice work, well done sir. A few things to note:
First a couple of ticky-tacky things that aren't a huge deal but worth mentioning...
You may want to consider using a...
-- Itzik Ben-Gan 2001
March 29, 2016 at 10:46 pm
If you had a calendar table available the you can do it like this (note my code and comments):
USE tempdb
GO
-- Simplified calendar table with only the columns you need
IF OBJECT_ID('dbo.calendar')...
-- Itzik Ben-Gan 2001
March 29, 2016 at 9:51 pm
Phil Parkin (3/29/2016)
Alan.B (3/29/2016)
You would use AND.
SELECT vend_id, prod_id, pro_priceFROM products
WHERE prod_price <=5
AND vend_id IN (1001, 1002);
Disagree. This requires an OR.
select a from b where condition1
union (should probably be union...
-- Itzik Ben-Gan 2001
March 29, 2016 at 10:41 am
You would use AND.
SELECT vend_id, prod_id, pro_price
FROM products
WHERE prod_price <=5
AND vend_id IN (1001, 1002);
-- Itzik Ben-Gan 2001
March 29, 2016 at 10:31 am
Can you include some DDL and sample data?
-- Itzik Ben-Gan 2001
March 29, 2016 at 10:29 am
SQL Guy 1 (3/28/2016)
And about the value for threshold for parallelism, you recommend to do some research. Can I ask what should I check for it?
I am not an...
-- Itzik Ben-Gan 2001
March 28, 2016 at 2:39 pm
SQL Guy 1 (3/28/2016)
Estimated execution plan inserts...
-- Itzik Ben-Gan 2001
March 28, 2016 at 12:18 pm
Jacob Wilkins (3/28/2016)
DesNorton (3/28/2016)
-- Itzik Ben-Gan 2001
March 28, 2016 at 9:52 am
Great article Andy, well done.
-- Itzik Ben-Gan 2001
March 28, 2016 at 9:18 am
Jon.Morisi (3/25/2016)
I bet there's only 2 to pick from, if you can even find one. :hehe: BI books in general have been hard to come by since 2008...
Yep.
-- Itzik Ben-Gan 2001
March 26, 2016 at 11:16 am
Jacob Wilkins (3/25/2016)
Sachin Nandanwar (3/25/2016)
...But again it looks to cumbersome with all those conditions in the CASE expression.Your original solution is more subtle.
Your version doesn't have to be that complicated.
It...
-- Itzik Ben-Gan 2001
March 25, 2016 at 11:28 am
Viewing 15 posts - 886 through 900 (of 2,462 total)