Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
jcb267
Constraint Violating Yak Guru
291 Posts |
Posted - 2009-01-19 : 19:12:35
|
| I am working on a query that relies on data from multiple tables. This is what I have:select tblBilling.cID, tblBilling.bID, tblBilling.bNumber, tblBilling.bAmount, tblPayments.pAmount, tblBilling.bStatus, tblPayments.pID, tblCustomers.cFirstName, tblCustomer.cLastNamefrom tblBilling INNER JOIN tblCustomer ON tblBilling.cID = tblCustomer.id tblPayments INNER JOIN tblBilling ON tblBilling.cID = tblPayments.cIDCan you help me? |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
jcb267
Constraint Violating Yak Guru
291 Posts |
|
|
EugeneLim11
Posting Yak Master
167 Posts |
Posted - 2009-01-19 : 21:11:52
|
| Hi, Is this what you are trying to do?select tblBilling.cID, tblBilling.bID, tblBilling.bNumber, tblBilling.bAmount, tblPayments.pAmount, tblBilling.bStatus, tblPayments.pID, tblCustomers.cFirstName, tblCustomer.cLastNamefrom tblBilling, tblPayments, tblCustomer wheretblBilling.cID = tblCustomer.idand tblBilling.cID = tblPayments.cIDThe above should work for inner join check out my blog at http://www.aquariumlore.blogspot.com |
 |
|
|
jcb267
Constraint Violating Yak Guru
291 Posts |
Posted - 2009-01-19 : 21:17:11
|
That worked perfect! Thank you.quote: Originally posted by EugeneLim11 Hi, Is this what you are trying to do?select tblBilling.cID, tblBilling.bID, tblBilling.bNumber, tblBilling.bAmount, tblPayments.pAmount, tblBilling.bStatus, tblPayments.pID, tblCustomers.cFirstName, tblCustomer.cLastNamefrom tblBilling, tblPayments, tblCustomer wheretblBilling.cID = tblCustomer.idand tblBilling.cID = tblPayments.cIDThe above should work for inner join check out my blog at http://www.aquariumlore.blogspot.com
|
 |
|
|
|
|
|
|
|