Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GROUP BY boolean field invalid
Message
De
17/09/2001 13:15:30
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00557354
Message ID:
00557367
Vues:
14
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform