Viewing 15 posts - 9,226 through 9,240 (of 10,144 total)
Cross-post, answered here:
http://www.sqlservercentral.com/Forums/Topic615978-338-1.aspx?Update=1
December 9, 2008 at 2:38 am
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...
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?
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...
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.
December 8, 2008 at 1:20 pm
LOOKUP_BI (12/8/2008)
You should...
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...
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...
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...
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...
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 >...
December 8, 2008 at 9:20 am
What's the name of your PK column in Test_HistoricalData?
December 8, 2008 at 9:05 am
Had a part in this did Yoda? 😀
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)
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?
December 8, 2008 at 8:21 am
Viewing 15 posts - 9,226 through 9,240 (of 10,144 total)