|
Posted by bwalton_707 on 11/27/07 17:40
I'm completely lost why a trival task in VFP is a lengthy drawn out
process in SQL Server
For Example
A simple select statement where I want to return the most current date
from a table along with the unique identifier for the row selected is
a single select statement in VFP
SELECT TOP 1 date, id
FROM anytable
ORDER BY id, date desc
GROUP BY id
OR Another example
SELECT invoice.number, customer.name, customer.address, invoice.id,
customer.id
FROM invoice
INNER JOIN customer
ON invoice.customerid = customer.id
ORDER BY customer.id, invoice.date DESC
GROUP BY customer.id
This will return the most recent order for a customer
Niether selects statements are supported in SQL Server 2005... Is
there a logical reason WHY? Other then ansi standards which I'm not
buying as m$ft rarely follows any standards but there own 100% of the
time anyway.
Also could someone please post the most efficent SQL eq
Navigation:
[Reply to this message]
|