|
-
Jul 5th, 2000, 05:20 AM
#2
Can you clarify your table structure a bit?
Your customer table must have a primary key CustomerID.
Your bill table will also have a primary key BillID.
Now, what do you have a third table for? If you want to track bill-wise details, they are available from the Bills table. You can also store the CustomerID in the Bills table, so that you can know which bill was issued to which customer. In this kind of structure, the SQL statement would look like:
Select * from Bills where CustomerID = 'A0001'
or if you want multiple values of CustomerID, then:
Select * from Bills where CustomerID in ('A0001','B0003','H0123')
If you can give details of the primary keys and foreign key references in the three tables you mentioned, I can give you a more specific answer.
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
|