Viewing 15 posts - 4,786 through 4,800 (of 26,490 total)
ScottPletcher (7/23/2015)
Lynn Pettis (7/23/2015)
ScottPletcher (7/23/2015)
...
I do say never. Never use ISNULL() in a WHERE or JOIN -- it's never needed, and it can be very harmful.
Never specify a unicode...
July 23, 2015 at 3:29 pm
Sean Lange (7/23/2015)
Ed Wagner (7/23/2015)
Sean Lange (7/23/2015)
July 23, 2015 at 2:25 pm
Ed Wagner (7/23/2015)
Lynn Pettis (7/23/2015)
Ed Wagner (7/23/2015)
Sean Lange (7/23/2015)
July 23, 2015 at 2:22 pm
ScottPletcher (7/23/2015)
...
I do say never. Never use ISNULL() in a WHERE or JOIN -- it's never needed, and it can be very harmful.
Never specify a unicode literal unless you...
July 23, 2015 at 2:05 pm
ScottPletcher (7/23/2015)
DECLARE @starting_year int
SET @starting_year = 2012
SELECT subquery.ID, e.NAME, subquery.Year, subquery.Max_Date
FROM (
SELECT ID,...
July 23, 2015 at 1:55 pm
lsalih (7/23/2015)
I will thank you, where EnrollmentDate is coming from?
From this in the FROM clause:
CROSS APPLY (VALUES(DTE.StartDate),(DTE.EndDate)) x(EnrollmentDate)
July 23, 2015 at 1:53 pm
lsalih (7/23/2015)
Lynn - the answer is yes.
Please explain how an ENDDATE can be less than the corresponding STARTDATE.
July 23, 2015 at 1:44 pm
Ed Wagner (7/23/2015)
Sean Lange (7/23/2015)
July 23, 2015 at 1:42 pm
ScottPletcher (7/23/2015)
Lynn Pettis (7/23/2015)
WayneS (7/23/2015)
ScottPletcher (7/23/2015)
Btw, the WHERE clause can be improved to allow an index seek, if applicable:WHERE
LEFT(name, 5) = 'APTMP'should be:
WHERE name LIKE 'APTMP%'
Good luck with adding...
July 23, 2015 at 1:36 pm
lsalih (7/23/2015)
Here is the script:
Create table EMP
(ID INT,
NAME NVARCHAR(10)
)
insert into EMP values (1, 'JOHN')
create table EMP_INFO
(ID INT,
STARTDATE DATE,
ENDDATE...
July 23, 2015 at 1:31 pm
Brandie Tarvin (7/23/2015)
Sigh. I feel like I'm pulling teeth on this forum some days.
Thinking you should have been a Dentist?
July 23, 2015 at 12:17 pm
WayneS (7/23/2015)
ScottPletcher (7/23/2015)
Btw, the WHERE clause can be improved to allow an index seek, if applicable:WHERE
LEFT(name, 5) = 'APTMP'should be:
WHERE name LIKE 'APTMP%'
Good luck with adding that index to...
July 23, 2015 at 12:12 pm
WayneS (7/23/2015)
SQLRNNR (7/23/2015)
dweil (7/23/2015)
July 23, 2015 at 12:08 pm
Jayanth_Kurup (7/23/2015)
July 23, 2015 at 9:39 am
Here are the tables used in the FROM clause and the number times each is referenced:
Table Name ...
July 23, 2015 at 9:29 am
Viewing 15 posts - 4,786 through 4,800 (of 26,490 total)