Ianpbaker
Apr 11th, 2000, 04:28 PM
I was wondering If some one can help me out.
I have two tables that I need to retrive data from both have the same primary key (1 to many). I need to display all the information from the first table and how many fields that match in the second table. I've been playing around with the count Funtion and using an inner query but cannot get it to do what I need. Bellow is roughly the way I need it. Thanks in advance for any help.
SELECT primarykey,field1,field2, count(all the fields in table2 that has the primarykey of table1) FROM table1
I have two tables that I need to retrive data from both have the same primary key (1 to many). I need to display all the information from the first table and how many fields that match in the second table. I've been playing around with the count Funtion and using an inner query but cannot get it to do what I need. Bellow is roughly the way I need it. Thanks in advance for any help.
SELECT primarykey,field1,field2, count(all the fields in table2 that has the primarykey of table1) FROM table1