I am using "Microsoft SQL Server Management Studio Express 2005"
- I am running the following Transact SQL Query:
SELECT Customer.FirstName, Customer.LastName, Customer.HomePhone,
(SELECT MAX(Orders.OrderDate)
FROM Orders
WHERE Orders.CustomerID = Customer.CustomerID) AS LastOrderDate
FROM Customer
- I get the following error:
Major Error 0x80040E14, Minor Error 25501
> SELECT Customer.FirstName, Customer.LastName, Customer.HomePhone,
(SELECT MAX(Orders.OrderDate)
FROM Orders
WHERE Orders.CustomerID = Customer.CustomerID) AS LastOrderDate
FROM Customer
There was an error parsing the query. [ Token line number = 2,Token line offset = 5,Token in error = SELECT ]
- Does anyone know what I am doing wrong? This query works fine in Microsoft Access Jet SQL.
Thank you,
Chillay
- I am running the following Transact SQL Query:
SELECT Customer.FirstName, Customer.LastName, Customer.HomePhone,
(SELECT MAX(Orders.OrderDate)
FROM Orders
WHERE Orders.CustomerID = Customer.CustomerID) AS LastOrderDate
FROM Customer
- I get the following error:
Major Error 0x80040E14, Minor Error 25501
> SELECT Customer.FirstName, Customer.LastName, Customer.HomePhone,
(SELECT MAX(Orders.OrderDate)
FROM Orders
WHERE Orders.CustomerID = Customer.CustomerID) AS LastOrderDate
FROM Customer
There was an error parsing the query. [ Token line number = 2,Token line offset = 5,Token in error = SELECT ]
- Does anyone know what I am doing wrong? This query works fine in Microsoft Access Jet SQL.
Thank you,
Chillay