Viewing 15 posts - 5,341 through 5,355 (of 10,143 total)
Post the code of the stored procedure. Without it, the best folks can do is guess.
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, 2013 at 6:14 am
Minnu (1/8/2013)
Small change in my requeirement...
Table_Name : Table1
Col_1Col_2
----------------------
100Prod
101Sales
102Mark
103Purc
if exists (select 1 from Table1 where Col_1=100) then
i want to get the corresponding column value of 100, that is "Prod" 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
January 8, 2013 at 6:50 am
MM_SQLQuestion (1/8/2013)
So I had to change it to
select NameField,COUNT(table2.LinkField) FROM
Table1
LEFT JOIN Table2 ON Table1.LinkField...
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 8, 2013 at 6:45 am
;WITH CTE AS
(
SELECT forumId,ParentId,HitNumber,
Seq = CAST(','+CAST(forumId AS VARCHAR(2)) AS VARCHAR(20))
FROM #tab1
WHERE ParentId IS NULL
UNION ALL
SELECT DD2.forumId, DD2.ParentId, DD2.HitNumber,
Seq = CAST(CTE.Seq + ',' + CAST(DD2.forumId AS VARCHAR(2)) AS VARCHAR(20))
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 8, 2013 at 6:41 am
ScottPletcher (1/7/2013)
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 8, 2013 at 4:03 am
Stefan Krzywicki (1/7/2013)
Brandie Tarvin (1/7/2013)
jasona.work (1/7/2013)
SQLRNNR (1/7/2013)
Brandie Tarvin (1/7/2013)
Windows 8 Pro is on sale for $40.00 (U.S.) through the end of the month. It's a download.:sick:
It's not that bad...
I've been...
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 8, 2013 at 2:23 am
It looks ok to me, Terry. Try this:
SELECT
ID,
Result =
case when FB_chk = -1 Then ' FB_chk=True' else '' end
+ case when TW_chk = -1 Then ' TW_chk=True' else...
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 7, 2013 at 9:22 am
It's easier to read, when rewritten like this:
SELECT
p.StockCode,
MIN(CASE WHEN orders.[Week] = 1 THEN orders.Supplier END) AS [1],
.
.
MIN(CASE WHEN orders.[Week] = 53 THEN orders.Supplier END) AS [53]
FROM dbo.Products p
INNER...
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 4, 2013 at 8:48 am
GilaMonster (1/2/2013)
ChrisM@Work (1/2/2013)
May 2013 bring you excitement, enlightenment and all the rewards you deserve.Why do I have to wait til May?
Meh, I just knew someone would pick this up 😛
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 2, 2013 at 7:02 am
Happy New Year to all of you special people on this thread who keep us mere mortals amused during our all-too-brief lunchtimes. May 2013 bring you excitement, enlightenment and all...
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 2, 2013 at 6:33 am
Steve Jones - SSC Editor (12/21/2012)
Did the world end and SQLServerCentral make it to heaven? All you here with me?
Yes it did Steve and you've been a baaad boy or...
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
December 21, 2012 at 8:36 am
Gianluca Sartori (12/21/2012)
ChrisM@Work (12/21/2012)
Koen Verbeeck (12/21/2012)
ChrisM@Work (12/21/2012)
Anybody out there?Yes, but I'm very busy fighting off the zombie apocalypse.
I thought that big scary yellow thing in the sky was the zombie...
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
December 21, 2012 at 3:24 am
Koen Verbeeck (12/21/2012)
ChrisM@Work (12/21/2012)
Anybody out there?Yes, but I'm very busy fighting off the zombie apocalypse.
I thought that big scary yellow thing in the sky was the zombie apocalypse until 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
December 21, 2012 at 2:25 am
Anybody out there?
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
December 21, 2012 at 2:09 am
Shalinder, you could use a cross-apply cascade, something like this:
SELECT d.TheString,
Col1 = SUBSTRING(TheString,1,p1-1),
Col2 = SUBSTRING(TheString,p1+1,p2-p1-1),
Col3 = SUBSTRING(TheString,p2+1,p3-p2-1),
Col4 = SUBSTRING(TheString,p3+1,p4-p3-1)
FROM (SELECT TheString = 'abcd9efghij9kl9mno', TheDelimiter = '9') d
CROSS APPLY (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
December 6, 2012 at 6:58 am
Viewing 15 posts - 5,341 through 5,355 (of 10,143 total)