G Guest Oct 19, 2007 #1 How may I write a query so it adds a field to the information otherwise returned which contains a sequential ID number?
How may I write a query so it adds a field to the information otherwise returned which contains a sequential ID number?
J John Nurick Oct 19, 2007 #2 Here's an example that works in Northwind: SELECT (SELECT COUNT(ProductName) FROM Products AS B WHERE B.ProductName <= A.ProductName) AS Seq, ProductID, ProductName FROM Products AS A ORDER BY ProductName ;
Here's an example that works in Northwind: SELECT (SELECT COUNT(ProductName) FROM Products AS B WHERE B.ProductName <= A.ProductName) AS Seq, ProductID, ProductName FROM Products AS A ORDER BY ProductName ;