Viewing 15 posts - 7,666 through 7,680 (of 10,143 total)
Paul White NZ (7/14/2010)
Eugene Elutin (7/14/2010)
Do you think this approach is viable for most of scenarious?...
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
July 14, 2010 at 7:24 am
Comment out this section, it isn't referenced in the SELECT:
LEFT OUTER JOIN
( SELECT p.EntityCode,
SUM(t.[On-Sale Rate]) AS OnSale,
SUM(t.[Off-Sale Rate]) AS OffSale
FROM aztec.dbo.ProductTaxRules p, aztec.dbo.TaxRules t
WHERE (p.TaxRule1 = t.[Index No]...
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
July 14, 2010 at 6:59 am
/*
i need result like
------------------------------
sriram Thiru
Thiru Hari
Hari KSS
----------------
*/
DROP table #emp
create table #emp
(
eno int,
ename varchar(20),
designation varchar(20),
report_to int
)
insert into #emp values (1000,'Sriram','STE',100)
insert into #emp values (100,'Thiru','PL',10)
insert into #emp values (10,'Hari','PM',5)
insert into #emp values...
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
July 14, 2010 at 5:00 am
jon pill (7/14/2010)
SELECT min(upvolume),min(downvolume),Max(upvolume),Max(downvolume)
FROM
(SELECT upvolume,downvolume,TotalTrades from DBVaskVbid WITH (NOLOCK) where BarStamp >= '7/13/2010') as XDtable
WHERE TotalTrades
BETWEEN
(SELECT MAX(TotalTrades)FROM DBVaskVbid WITH (NOLOCK)) -1000
AND
(SELECT MAX(TotalTrades)FROM DBVaskVbid WITH...
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
July 14, 2010 at 4:44 am
/*
I need to return distinct OrderIDs where the following conditions are met:
• The order is just for Bananas (ie just the one row exists for an OrderID)
• The order 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
July 14, 2010 at 4:22 am
To have and to hold your cake and eat 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
July 13, 2010 at 9:49 am
Eugene Elutin (7/13/2010)
Looks like there is no simple way (set-based) to do it in SQL2005.
DBCC GetGapsInSpec
Depends on the fillfactor of the spec - if it's less than 50%, you 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
July 13, 2010 at 9:46 am
The Mamas and the Papas
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
July 13, 2010 at 9:41 am
Paul White NZ (7/13/2010)
Chris Morris-439714 (7/13/2010)
It's great ... but...the order of the output doesn't match the order specified by the OP 😛Yeah, but the OP got it wrong!
TWICE! 😀
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
July 13, 2010 at 9:38 am
Paul White NZ (7/13/2010)
Eugene Elutin (7/13/2010)
I knew it wouldn't work, however it does look nice (as result of creative thinking
It does indeed look very pretty 😎
I'm going with the upgrade...
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
July 13, 2010 at 9:32 am
thava (7/13/2010)
wow that's great simple and easy chrisi got it thanks for your reply
Gosh :blush: 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
July 13, 2010 at 9:17 am
Thanks Paul, that was interesting - if challenging - reading. I've not yet used rCTEs to resolve hierarchies in anger. This would be a good place to start, given a...
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
July 13, 2010 at 9:10 am
Have you tried a left join?
FROM BatchStock b
LEFT JOIN #Tmp t ON t.slno = b.slno AND t.itemid = b.itemid
WHERE b.PurId = @PurID AND b.DocRef = @DocRef
AND t.slno 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
July 13, 2010 at 9:05 am
Paul White NZ (7/13/2010)
skcadavre (7/13/2010)
Paul White NZ (7/13/2010)
Where should 1.2.10 sort, I wonder...?Chris Morris-439714 (7/13/2010)
Or 1.1.3, even...I think the OP specified the location of that.
He did.
I took Chris' post 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
July 13, 2010 at 7:16 am
Paul White NZ (7/13/2010)
skcadavre (7/13/2010)
You killed both solutions 😛
It's a knack 😉
I'm thinking CHARINDEX, split on the period and sort that way?
That would work (and Chris would provide a recursive...
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
July 13, 2010 at 6:25 am
Viewing 15 posts - 7,666 through 7,680 (of 10,143 total)