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

Click here to load this message in the networking platform