Hello Rbase Pros, I have struggled with an update command for years. Everytime I have to do it, I end up writing a program. I know there must be a way to do this. I have one table (BBWomen), where I want to store the number of related records from a second table. I want to count the number of times each woman attended a group activity. So I have an Activity table with client's SS# and Activity Type and Activity Date with hundreds of thousands of rows of data. And I want to store it in the BBWomen table in a column called SessionCount,
I tried a dozen command syntaxes and none of them worked. Here is a sample. update BBWomen set SessionCount = (count(*)) from ACTIVITY t1, BBWomen t2 where t1.SSN=t2.SSN and t1.ActType='Group' update BBWomen set SessionCount = (count(SSN)) from ACTIVITY t1, BBWomen t2 where t1.SSN=t2.SSN and t1.ActType='Group' update BBWomen set SessionCount = (count(SSN)) from ACTIVITY where SSN=SSN and ActType='Group' update BBWomen set SessionCount = (count(SSN)) in ACTIVITY where SSN=SSN and ActType='Group' Can someone help?Thank you!!Patti -- For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php --- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to rbase-l+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/12090348.945037.1598927732957%40mail.yahoo.com.