Viewing 15 posts - 2,716 through 2,730 (of 10,143 total)
or resolve it in the string:
+ '
FROM employee m
LEFT JOIN shiftdetails b ON m.empno = b.empno
where b.shifttype = ''' + @shifttype +
''' GROUP BY...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 15, 2015 at 4:53 am
BWFC (1/15/2015)
richxs (1/15/2015)
Giraffe DBA (1/14/2015)
SQLRNNR (1/14/2015)
Ed Wagner (1/14/2015)
djj (1/14/2015)
BWFC (1/14/2015)
Ed Wagner (1/14/2015)
Stuart Davies (1/14/2015)
TomThomson (1/13/2015)
Ed Wagner (1/13/2015)
SQLRNNR (1/13/2015)
regexPattern
Match
Point
Edge
Bono
Sonny
Cher
Babe (i've got you ...)
Ruth
Sultan
Swing
Swap
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 15, 2015 at 2:28 am
Lynn Pettis (1/14/2015)
Steve Jones - SSC Editor (1/14/2015)
Boy, it seems like my questions are getting worse lately. Taking a beating in the QoD.
Don't worry about it. Some people...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 15, 2015 at 1:59 am
Koen Verbeeck (1/13/2015)
FYI, I received the Author of the Year award at MSSQLTips.com!Thanks everyone for voting!
Very well done mate, richly deserved.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 15, 2015 at 1:53 am
Aaron N. Cutshall (1/14/2015)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 15, 2015 at 1:46 am
Aaron N. Cutshall (1/14/2015)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 15, 2015 at 1:43 am
briankwartler (1/14/2015)
edwardwill (1/14/2015)
Actually, it returns:Msg 102, Level 15, State 1, Line 4
Incorrect syntax near ','.
Perhaps you are missing a comma?
No, it's version-specific. The code runs on 2008+.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 14, 2015 at 6:14 am
Aaron N. Cutshall (1/13/2015)
ChrisM@Work (1/13/2015)
Firstly, the FROM list of your query, which looks like
SELECT ...
FROM parent
LEFT JOIN child to...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 14, 2015 at 1:30 am
There are two issues here which might be causing some confusion.
Firstly, the FROM list of your query, which looks like
SELECT ...
FROM parent
LEFT JOIN child to parent
INNER JOIN grandchild to...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 13, 2015 at 2:23 am
SELECT tp.*, s.acct, s.enterDate, s.processDate
FROM temp tp
INNER join staticTable s
ON tp.acct = s.acct
WHERE
s.enterDate NOT IN (@conversiondate, @termDate)
OR -- if s.enterDate IS equal to @conversiondate or @termDate...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 12, 2015 at 9:30 am
SAMDEV (1/12/2015)
For this purpose I cannot directly insert values from...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 12, 2015 at 7:45 am
SAMDEV (1/12/2015)
For this purpose I cannot directly insert values from...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 12, 2015 at 7:44 am
SAMDEV (1/12/2015)
Now, during my debugging...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 12, 2015 at 7:16 am
You might want to read about table aliases - they will make your code much easier to read:
SELECT
12-COUNT(a.PatientID) AS NumberOfPatientsCurrentlyEnrolled,
a.CourseID,
l.LocationDesc,
c.CourseDate
FROM dbo.tblCourses c
INNER JOIN dbo.tblLkup_Location l
ON c.Location_ID...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 12, 2015 at 6:14 am
;WITH Primaries AS (
SELECT *
FROM #Test
WHERE id = 3
)
SELECT *
FROM Primaries
UNION ALL
SELECT t.*
FROM #Test t INNER JOIN Primaries p ON p.c1 = t.c2
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 9, 2015 at 9:53 am
Viewing 15 posts - 2,716 through 2,730 (of 10,143 total)