|
-
Jun 2nd, 2000, 02:37 AM
#1
Thread Starter
Addicted Member
okay I have a column where for example say I have the number
100423 well I can have another 100423 it is not unique. How can I write code in SQL working in SQL that can do that.
What I am basically trying to do is if there is only one instance of a particular number. I want to get a count of all those, any ideas?
-
Jun 2nd, 2000, 02:58 AM
#2
Lively Member
you should create your recordset with an SQLString, which only selects the columns that match the number your looking for
sqlString="SELECT * FROM table WHERE column=" & searchnumber
afterwards you can see with Recordset.Recordcount how many records you have
Hope this helps
-
Jun 2nd, 2000, 03:18 AM
#3
Thread Starter
Addicted Member
i dont' now the exact number i want to select any numbers that only have one entry. . .
Does this help or do i need help????
-
Jun 2nd, 2000, 06:12 AM
#4
Frenzied Member
select key, count(key) from table group by key
change the word "key" in the above SQL to the item you want to count...
-
Jun 2nd, 2000, 06:29 AM
#5
You could add a HAVING clause to JHausmann's SQL statement. such as:
select key, count(key) from table group by key
HAVING count(key) = 1
"It's cold gin time again ..."
Check out my website here.
-
Jun 2nd, 2000, 07:02 AM
#6
Frenzied Member
I agree, I missed the part where he said he only wanted one entry...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|