Viewing 13 posts - 1 through 13 (of 13 total)
Sorry, my previous post included some mistakes.
here is the corrected code:
SELECT CASE
WHEN @date1Max >= @date2Max AND @date1Max >= @date3Max THEN @date1Max
WHEN @date2Max >= @date1Max AND @date2Max >= @date3Max...
December 4, 2013 at 3:53 pm
Or like this?
--select the grandmax of the max of three columns
DECLARE @date1Max AS datetime = (SELECT MAX([orderdate])
FROM [Sales].[OrderValues]);
DECLARE @date2Max AS datetime = (SELECT MAX([requireddate])
FROM [Sales].[OrderValues]);
DECLARE @date3Max AS datetime...
December 4, 2013 at 1:24 pm
Well said! I just try to keep it. Simple.
December 4, 2013 at 12:50 pm
That's correct but at the WHERE Clause there is just one result set to filter, the result of the join, no need to filter on both tables.
December 3, 2013 at 2:37 pm
I know but someone posted a reply and I just replied just in case.
Thanks
oj
December 3, 2013 at 12:13 pm
the database TSQL2012 used in the following script can be downloaded at:
http://tsql.solidq.com/books/tk70461/
USE TSQL2012;
--select the grandmax of the max of three columns
DECLARE @date1Max AS datetime = (SELECT MAX([orderdate])
FROM [Sales].[OrderValues]);
DECLARE @date2Max...
December 3, 2013 at 12:00 pm
Could it be that what he is trying to accomplish is the following?
Select count(*)
from tblevent a inner join tblevent b on
a.omsid = b.omsid
where Recordtype in( 'promo', 'event')
December 3, 2013 at 9:32 am
This is a great idea, judging by the debate that it has generated. May I suggest another topic that could generate some controversial debate also?
I think that...
November 24, 2013 at 6:55 pm
This doesn't sound unreasonable either but, want to ask you is, what should one add to one's skill set to become an expert?
November 24, 2013 at 6:39 pm
I think that a basic level of proficiency should include implementing structured and unstructured error handling.
About the apply and the windowing functions, or OVER CLAUSES as some developers call them,...
November 22, 2013 at 6:18 pm
Viewing 13 posts - 1 through 13 (of 13 total)