Use your select command to populate a variable first:

Select (count(CASENUM)) into vCount Ind Vin0 from ACTIVITY  where 
CASENUM=CASENUM

Update ClientTab Set MyColumn = .vCount where CaseNum = CaseNum




> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf Of Patti
> Jakusz
> Sent: Monday, October 05, 2015 10:33 AM
> To: [email protected]
> Subject: [RBASE-L] - update command help
> 
> I have a table of client records and a table of activity records.
> Occasionally, I want to count the number of certain types of activity
> records for a client and plug that number into the client table.  It
> should be a simple command, but I can't get it to work.
> 
> Here are some of my attempts:
> 
> update CLIENTTAB set MyColumn=(count(*)) from ACTIVITY where
> CASENUM=CASENUM
> 
> 
> update CLIENTTAB set MyColumn=(count(CASENUM)) from ACTIVITY where
> CASENUM=CASENUM
> 
> 
> update CLIENTTAB set MyColumn=(count(CASENUM)) from CLIENTTAB t1,
> ACTIVITY t2 where
>          t1.CASENUM=t2.CASENUM
> 
> 
> update CLIENTTAB set MyColumn=(select(count(CASENUM)) from ACTIVITY
> where CASENUM=CASENUM)
> 
> 
> 
> 
> I know there has to be a simple command and I'm just not getting it.
> 
> Can someone help?
> 
> Thanks,
> Patti


Reply via email to