It wouldn't work. SQL 7 doesn't allow column number in Group By.
>Here's an
untested hack:
>
>
SELECT CAST(A.Closed AS INT) AS ClosedInt,
>A.*, B.Vendorname, SUM(C.Subtotal) AS InvoiceTotal
>FROM Invoice A JOIN Vendor B ON A.VenID=B.VenID
>JOIN LineItem C ON A.InvoiceID=C.InvoiceID
>WHERE A.InvoiceID=1000
>GROUP BY A.InvoiceID, A.VenID, A.InvDate, 1
>
>Basically, convert the bit into an integer, then order by the integer.
>
>HTH
>
>>The "Closed" field above in the Invoice table is a bit field and in SQL7 I get "Cannot group by a bit column." error. How do I pull this off so it works? TIA.
--sb--