Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Query 1

Status
Not open for further replies.

leej1

Programmer
Nov 28, 2002
12
US
Hi
Having trouble updating the sum of the number of groups into a one record table.
Ex multiple social security numbers in a table with duplicates. I want to know how many groups, and update the total groups to a one record table.
ex soc no
111-11-1111
111-11-1111
222-22-2222
2 groups
Thanks
leej1
 
if you have an ID field, or any other field other than the number one.

select count(AnotherField) as total_records Group by ExSocNo


This should return the value you want, if you want it to update to a table simply stick an update / append query with this as the updating field

daveJam

*two wrongs don't make a right..... but three lefts do!!!!*
 
sorry you need your from bit in there, not thinking today

SELECT count(field) as total_records FROM YourTable GROUP BY ExSocNo

cheers

daveJam

*two wrongs don't make a right..... but three lefts do!!!!*
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top