Viewing 12 posts - 1,216 through 1,228 (of 1,228 total)
amitabhssinha (12/29/2009)
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
December 31, 2009 at 3:50 am
amitabhssinha (12/31/2009)
This is part of my query:(CASE
WHEN (DATEDIFF(second,Actual.ActualDepartTime,Schedule.SchdDepartTime)/60) >=60
THEN Convert(nvarchar(10),(DATEDIFF(second,Actual.ActualDepartTime,Schedule.SchdDepartTime)/60)/60)+' '+'hr'
Else (DATEDIFF(second,Actual.ActualDepartTime,Schedule.SchdDepartTime)/60) +' '+'min.'
END) AS DeptEarly
There's an error in your ELSE condition
DROP TABLE #Actual
DROP TABLE...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
December 31, 2009 at 3:39 am
Jeff Moden (12/30/2009)
Man, in the presence of a clustered index on the ID, that's some mighty fast code there, Chris.
:blush: thanks Jeff. I read your triangular join article!
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
December 30, 2009 at 11:43 pm
Cheers Lutz!
Having SQL Server handy to play with helps a bit ...
Looks like the OP has at least two solutions to choose from & tweak to perfection. Job's a...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
December 30, 2009 at 3:11 pm
Another overcomplicated effort from the peanut gallery.
SELECT d.OutputRowNo,
MAX(CASE ColumnName WHEN 'ID' THEN [Text] END) AS [ID],
MAX(CASE ColumnName WHEN 'SubjectArea' THEN [Text] END) AS [SubjectArea],
MAX(CASE ColumnName WHEN 'LocalCourseCode' THEN [Text]...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
December 30, 2009 at 2:40 pm
GSquared (12/29/2009)
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
December 29, 2009 at 10:26 am
Justin James (12/29/2009)
There is not. I was thinking of using ROW_NUMBER(), but was unsure how to partition by each block of 6 rows.
Like this:
;WITH CTE1 AS (
SELECT ((UniqueID-1)/6)+1 AS CourseBlock,...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
December 29, 2009 at 10:21 am
Justin James (12/29/2009)
Yes, that is correct. Each block of 6 is destined to become a singular row in the final table.
Is there a missing column which would uniquely identify each...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
December 29, 2009 at 10:00 am
Hi Justin
This might sound daft, but bear with me...
How do you know that UniqueID 4 is the school for ID 123146, and not UniqueID 10? Or to put it ab
another...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
December 29, 2009 at 9:48 am
GilaMonster (12/28/2009)
jcrawf02 (12/28/2009)
if I can control my PC with words, gestures and simply my presence
Why not, Gail? You do this with other people's servers all over the world...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
December 29, 2009 at 7:34 am
warrenstroebel (12/16/2009)
I have successfully written most of it out in advance...
Warren, does the following query generate the same results as yours, by any chance?
SELECT TOP 1 e.EmployerName AS EmployerName1,
e.EmployerName...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
December 29, 2009 at 5:02 am
Gianluca Sartori (11/17/2009)
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
December 29, 2009 at 12:24 am
Viewing 12 posts - 1,216 through 1,228 (of 1,228 total)