Viewing 15 posts - 1,921 through 1,935 (of 4,085 total)
This is basic SQL. I suggest that you do your own homework.
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 31, 2017 at 3:55 pm
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 31, 2017 at 3:42 pm
1) The hours ranges given exclude times and allow times to...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 31, 2017 at 2:38 pm
I think that this will perform better, because LEFT is not SARGable, but LIKE can be SARGable when there is no leading wildcard as here.
SELECT p.ItemName...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 31, 2017 at 2:23 pm
can you really use < on varchar data and have it act reliably? Or...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 31, 2017 at 9:39 am
Use LEAD to find the next value of the status and then pull records where the current or next status is 'Terminated'.
;
WITH CTE AS
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 31, 2017 at 9:25 am
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 30, 2017 at 4:00 pm
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 30, 2017 at 3:42 pm
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 30, 2017 at 3:30 pm
MIN(), MAX(), and AVG() are properties of sets. You don't have any sets here.
Also, blabla is not a valid argument. If it's a string, it needs to be...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 30, 2017 at 3:02 pm
declare @test-2 as...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 30, 2017 at 2:52 pm
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 30, 2017 at 2:43 pm
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 30, 2017 at 2:32 pm
Also, if you create an ITVF, SQL will inline the code. That is, it will replace the function call with the body of the code from the function. That means that...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 30, 2017 at 11:39 am
You can do this in T-SQL, but it gets complicated very quickly. I would recommend that you use a reporting tool such as SSRS to produce these kinds of reports. J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 30, 2017 at 11:29 am
Viewing 15 posts - 1,921 through 1,935 (of 4,085 total)