Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GROUP BY boolean field invalid
Message
From
17/09/2001 13:15:30
 
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00557354
Message ID:
00557367
Views:
16
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.
Sylvain Demers
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform