Viewing 15 posts - 3,796 through 3,810 (of 10,143 total)
Jeff Moden (1/4/2014)
sayedkhalid99 (1/3/2014)
DECLARE @Result TABLE...
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 6, 2014 at 2:21 am
cs_source (1/3/2014)
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 3, 2014 at 9:59 am
It's a DB2 error, Laurie 😀
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 3, 2014 at 8:59 am
DECLARE @Result TABLE (Serial nvarchar(10),Title varchar(20))
INSERT INTO @Result
SELECT '1.1','a' UNION ALL
SELECT '1.2.1','b' UNION ALL
SELECT '1.2.2','C' UNION ALL
SELECT '1.2.3.4','G' UNION ALL
SELECT '1.11','B' UNION ALL
SELECT '1.2.33.4.5','Extra row' UNION ALL
SELECT '2.3','B' UNION ALL
SELECT...
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 3, 2014 at 8:45 am
Jeff Moden (1/3/2014)
ChrisM@Work (1/3/2014)
Jeff Moden (1/2/2014)
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 3, 2014 at 8:29 am
;WITH
[4] AS (SELECT n = 0 FROM (VALUES (0), (0), (0), (0)) d (n)),
[16] AS (SELECT n = 0 FROM [4] a, [4] b),
[256] AS (SELECT n = 0...
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 3, 2014 at 8:27 am
cs_source (1/3/2014)
hi Chris.m below is the sample data as well as my expected output (sorry...
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 3, 2014 at 8:01 am
You're welcome, thanks for the feedback 🙂
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 3, 2014 at 7:16 am
cs_source (1/2/2014)
Thank you, this query is very similar to my first query and it works great if the car is in "service/shop" on the same day, the problem i...
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 3, 2014 at 7:11 am
Thanks.
-- try this
SELECT a.EID, a.RATING, a.AbsenceStartDate,
AbsenceEndDate = ISNULL(b.AbsenceEndDate, a.AbsenceEndDate)
FROM @COMP_RATINGS a
LEFT JOIN @COMP_RATINGS b
ON b.EID = a.EID
AND b.RATING = a.RATING
AND b.AbsenceStartDate = a.AbsenceEndDate
WHERE NOT EXISTS (SELECT 1...
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 3, 2014 at 6:42 am
What's the maximum number of elements you can have in a "serial"? Your sample data shows 3, can it be more? There are two good ways of splitting this into...
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 3, 2014 at 6:32 am
Source data
(769,'b+','2011-06-30','2011-09-30'),
Required output
5364914 b+ 2011-09-30 00:00:00.0000000 2011-12-31 00:00:00.0000000
If the required output is incorrect then please correct it.
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 3, 2014 at 6:27 am
Thanks.
Please explain the result for rating = 'b+'.
There's only one row with this value in the sample data, and it's completely different in the required output.
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 3, 2014 at 6:11 am
kbhanu15 (1/3/2014)
THANK YOU FOR YOUR HELP.
THE QUERY IS SATISFYING THE SAMPLE GIVEN DATA.
BUT IT IS NOT SOLVING MY ORIGINAL PROBLEM.
THE ORIGINAL DATA IN THE TABLE:
5364914b+2011-09-30 00:00:00.00000002011-12-31 00:00:00.0000000
5364914bb2011-06-30 00:00:00.00000002011-09-30 00:00:00.0000000
5364914bb2011-12-31...
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 3, 2014 at 5:26 am
Please stop shouting.
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 3, 2014 at 4:15 am
Viewing 15 posts - 3,796 through 3,810 (of 10,143 total)