Viewing 6 posts - 46 through 51 (of 51 total)
RBarryYoung (1/10/2009)
SELECT ...
FROM (...) AS t CROSS JOIN @blocks b
...
SELECT ...
...
January 10, 2009 at 10:28 pm
And also, LEFT JOIN is not required here. You can just write it as:
SELECT t.calenderDate,
...
January 10, 2009 at 1:00 pm
Instead of that CASE in WHERE clause, you could write this:
SELECT t.calenderDate,
...
January 10, 2009 at 12:44 pm
This could also serve your purpose:
DECLARE @maxrows INT
SELECT @maxrows = COUNT(1) FROM Table1 -- or SET @maxrows = 10;
SELECT TOP (@maxrows) col1 FROM Table1
UNION ALL
SELECT TOP (2) col1 FROM...
January 8, 2009 at 7:50 am
You could apply an identity column if there isn't any.
ALTER TABLE table1 ADD id_temp INT NOT NULL IDENTITY(1,1)
-- This adds an identity column (id_temp) temporarily. You can remove the column...
January 5, 2009 at 8:46 am
I replaced the http path with a local file path and it worked fine for me. Are u sure the file exists in the path specified?
January 5, 2009 at 7:49 am
Viewing 6 posts - 46 through 51 (of 51 total)