I am looking for the code to count unique numbers. There will be a list of transaction numbers, I need to be able to count the ones that have different numbers
- posted
16 years ago
I am looking for the code to count unique numbers. There will be a list of transaction numbers, I need to be able to count the ones that have different numbers
Hi Tommyvcfs - you could try
select count(*) from [transaction]
This will show you the number of rows (records) on your transaction table. Each row is a different transaction where transaction number is the primary key
H> I am looking for the code to count unique numbers. There will be a list of
that works in the RMS database because the [transaction] table has a unique transactionNumber by definition.
To get a count of unique values in a column where the values can repeat (Item.DepartmentID for example) use this: select count(distinct departmentID) from Item
Or to find out how many occurances of each value there are:
select departmentID, count(*) from item group by departmentID
Glenn Adams Tiber Creek C> Hi Tommyvcfs - you could try
BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.