Viewing 9 posts - 2,161 through 2,169 (of 2,169 total)
It is very easy to build!
Suppose you have all coordinates in a table name 'Streets'. This table has a field named 'StreetName', a field named 'x' and a...
May 18, 2006 at 6:33 am
How are dates related to table structure?
Just help the guy!
Sale in Last Year?
Does that mean previous full year or current running last year?
DECLARE @WorkDate DATETIME, @StartDate DATETIME, @EndDate...
May 15, 2006 at 6:23 am
Andy, here is your code!
------------------------------------------------------------
SELECT Customers.CustomerID,
Customers.CustomerName,
LO.LastOrderDate,
(SELECT MAX(Orders.OrderDate) FROM Orders WHERE Orders.OrderDate < LO.LastOrderDate AND Orders.CustomerID = Customers.CustomerID) PreviousOrderDate
FROM Customers
LEFT JOIN (
...
May 15, 2006 at 5:21 am
If is really is a "start date", just use
WHERE start_date >= '11/05/2006'
If you just want the explicit date 11/05/2006, use
WHERE CONVERT(VARCHAR(10), start_date, 101) = '11/05/2006'
May 15, 2006 at 5:10 am
I think this is because SMALLINT can only handle number between -32786 and 32767, inclusive.
INT can handle numbers between -2147483648 and 2147483647, inclusive.
Check your tables to see if you have...
May 12, 2006 at 1:15 am
That seems to work! But only for SQL 2005, sadly enough.
We still have 1 SQL 6.5, 4 SQL 7.0 and 13 SQL 2000, so this is what I come up with to...
May 10, 2006 at 7:46 am
Yes. If you know which columns you want.
No. Since you have to hardwire the column names for the PIVOT operator in SQL 2005.
With my code you don't have to.
May 10, 2006 at 5:46 am
SELECT identitycol FROM WhatEverTable WHERE 1 = 0
May 10, 2006 at 5:12 am
Viewing 9 posts - 2,161 through 2,169 (of 2,169 total)