Viewing 15 posts - 9,226 through 9,240 (of 10,143 total)
ani112001 (12/9/2008)
I have a query like given…Is there any way to give the RoomName dynamically. I have several roomnames in a table. So its not possible to write case for...
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 9, 2008 at 2:37 am
Well done, many thanks for the feedback. I guess since this is the root of the problem, the whole chain is fixed now?
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 9, 2008 at 2:15 am
Either of these would do it. My preference is for the second style because it's easier to test.
UPDATE s SET ColleagueLimit = (SELECT Count(c.colleagueID) AS numOfColleagues
FROM SEND_COLLEAGUE_CONTACTS c
WHERE...
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 9, 2008 at 12:22 am
Sirish (12/8/2008)
How to rewrite this block in Oracle?.
Sorry, no idea. This is the SQL Server 2005 (T-SQL) section of the forum.
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 8, 2008 at 1:20 pm
LOOKUP_BI (12/8/2008)
You should...
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 8, 2008 at 10:23 am
You're welcome, thanks for the feedback. As this is an unusual requirement - well I think it is - would you mind posting your final solution here perhaps with an...
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 8, 2008 at 10:09 am
A Little Help Please (12/8/2008)
This is exactually how it is in a notepad file.
0007,24843.00,AAL.L,ANGLO AMERICAN,B1XZS82,05-DEC-08,24843.00,1.0000,GBP,GB00B1XZS820
No delimiters i.e. ""
Just commas between each column
When the file 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
December 8, 2008 at 9:42 am
Or better still:
UPDATE a SET Avg1WkVol = (SELECT AVG(Volume) from Test_HistoricalData b where b.Symbol = a.Symbol AND b.MarketDate a.MarketDate-8)
FROM Test_HistoricalData a
Although the previous version is much easier to...
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 8, 2008 at 9:39 am
A Little Help Please (12/8/2008)
Attched is a screen shot of the FlatFile Connection Manager.Shows a preview of the column which is incorrect.
Column 8
Column 9 here:
0007,24843.00,AAL.L,ANGLO AMERICAN,B1XZS82,05-DEC-08,24843.00,1.0000,GBPGB00B1XZS820
Open the flat file using...
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 8, 2008 at 9:24 am
Try this:
UPDATE h SET Avg1WkVol = d.Avg1WkVol
FROM Test_HistoricalData h
INNER JOIN (SELECT a.RowID, Avg1WkVol = (SELECT AVG(Volume)
FROM Test_HistoricalData b
WHERE b.Symbol = a.Symbol
AND b.MarketDate < a.MarketDate
AND b.MarketDate >...
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 8, 2008 at 9:20 am
What's the name of your PK column in Test_HistoricalData?
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 8, 2008 at 9:05 am
Had a part in this did Yoda? 😀
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 8, 2008 at 9:01 am
DECLARE @OriginalDate DATETIME
SET @OriginalDate = dateadd(dd,datediff(dd, 0, getdate()), 0)
IF EXISTS (SELECT 1 FROM dbo.HolidayTable WHERE HolidayDate = @OriginalDate)
SET @OriginalDate = DATEADD(dd, -1, @OriginalDate)
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 8, 2008 at 8:33 am
Thanks for the feedback!
As a matter of interest, did you run both methods? Did you measure / notice a difference in performance?
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 8, 2008 at 8:21 am
Select A.pic_id, A.Album_Type_Id, (Select MAX(B.pic_id) From Album B Where B.pic_id < A.pic_id) as Next_Id
From ALbum A
Where A.pic_id = @pic_id
And A.Album_Type_Id = @Album_Type_Id
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 8, 2008 at 8:02 am
Viewing 15 posts - 9,226 through 9,240 (of 10,143 total)