Perhaps just remove the group by clause. It seems spurious.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Steve Galyer
Sent: Wednesday, July 25, 2001 3:47 PM
To: Multiple recipients of list delphi
Subject: [DUG]: SQL Update question

I have a Client table and a Card table, each client can have any number of cards, what I am attempting to achieve is to update a field in the Client table called CardIssuedTotal with the count of the cards associated with that client.
 
I am using the following SQL statements, however I am getting an error "Parameter CARD.CardNumber has no default value"
 

UPDATE CLIENT

SET CLIENT.CardIssuedTotal =

(SELECT COUNT(CARD.CardNumber)

FROM CARD

GROUP BY CARD.ClientNumber)

WHERE (CLIENT.ClientNumber = CARD.ClientNumber);

Any assistance appreciated.

 

Steve Galyer

Reply via email to