Viewing 15 posts - 6,256 through 6,270 (of 10,143 total)
Anatoly Ukhvanov (6/14/2012)
I agree with you that in this example it looks strange: why they didn't call 'group_codeN' columns as...
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
June 14, 2012 at 7:50 am
Table zzxpgtyr has two columns which appear to have unique values,
group_type and pkey. Using both of these columns to join the table to the two other tables does...
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
June 14, 2012 at 6:57 am
Anatoly Ukhvanov (6/14/2012)
For example, the first method returns this:

What is it? reliableitservice wrote (Post #1314145) he/she wants this...
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
June 14, 2012 at 5:15 am
prakashp 84206 (6/14/2012)
Hi All,No any comments, What happen? I am waiting for answer. I was on leave for a week. Pls give me some solution.
You are likely to find your...
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
June 14, 2012 at 5:02 am
Hadrian (6/14/2012)
12 rows are returned after 5 hours run.
Are the results correct or not?
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
June 14, 2012 at 4:24 am
-- one method -------------------------------------------------------------
SELECT
[STYLE]= s.style,
Attributes.*
FROM #zzxstylr s
OUTER APPLY (
SELECT
[LBL]= MAX(CASE WHEN [type_name] = 'LBL' THEN g.Group_name ELSE NULL END),
[PRINT] = MAX(CASE WHEN [type_name] = 'PRINT' THEN...
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
June 14, 2012 at 4:02 am
SELECT
CAST(NEWID() AS CHAR(36)),
CASE CAST( ASCII (SUBSTRING( CAST( NEWID() AS VARCHAR(64)), 1, 1)) AS INT) % 2
WHEN 0 THEN 'OPTION 1' ELSE 'OPTION 2' END,
CASE ABS(CHECKSUM(NEWID()) % 2)
WHEN 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
June 14, 2012 at 3:14 am
Hadrian (6/14/2012)
Hi,It's a query developped by another and it told me that it returns something.
It returns 6 or 12 rows, I forget which - but are the results...
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
June 14, 2012 at 1:55 am
jeffem (6/13/2012)
Though the answers have already been shared, it can be useful to have the options for CONVERT() available at your disposal. This link[/url] can be a useful primer...
Only if...
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
June 13, 2012 at 9:52 am
Lynn Pettis (6/13/2012)
ChrisM@Work (6/13/2012)
AndrewSQLDBA (6/13/2012)
I have something simple that I am getting stumped on.
I have a complete date with time (2012-06-12 10:43:37), and I need only the date...
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
June 13, 2012 at 9:46 am
AndrewSQLDBA (6/13/2012)
I have something simple that I am getting stumped on.
I have a complete date with time (2012-06-12 10:43:37), and I need only the date portion. I have...
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
June 13, 2012 at 9:14 am
oradbguru (6/13/2012)
Okay, if someone can at least show me how to parse the string ...
No problem...
SELECT
*
FROM ( -- sample data
SELECT '2 Year 6 Months 20 Days' 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
June 13, 2012 at 8:42 am
Grant Fritchey (6/13/2012)
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
June 13, 2012 at 6:42 am
dwain.c (6/13/2012)
sridhar_kola (6/13/2012)
Hi ,Thanks , it does give the right results .
However, just to understand the code , what does the n%2 in the Where condition signify ?
thanks
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
June 13, 2012 at 6:09 am
Cadavre (6/13/2012)
Is that really any better Chris? I make it, at best the same or slightly worse...
You're absolutely right.
Even with the window function removed, the original code is...
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
June 13, 2012 at 4:52 am
Viewing 15 posts - 6,256 through 6,270 (of 10,143 total)