|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
SQL query - Inner Joins
I am trying to create a query which uses Inner Join.
The following 2 queries work by themselves, but I need to make them work in 1 query. I need the 1 query, because the output of these queries need to be listed as one record set. ==Query 1== SELECT * FROM tbl_property INNER JOIN tbl_cat_one_feat_eight_bet ON tbl_property.prop_ID = tbl_cat_one_feat_eight_bet.prop_ID WHERE cat_one_feat_eight_ID = 'c1f8_101' ==Query 2== SELECT * FROM tbl_property INNER JOIN tbl_cat_two_feat_six_bet ON tbl_property.prop_ID = tbl_cat_two_feat_six_bet.prop_ID WHERE cat_two_feat_six_ID = 'c2f6_101' ========= Any help trying to put these 2 queries together would be appreciated. Thank you |
|
#2
|
|||
|
|||
|
Code:
SELECT * FROM tbl_property INNER JOIN tbl_cat_one_feat_eight_bet ON tbl_property.prop_ID = tbl_cat_one_feat_eight_bet.prop_ID INNER JOIN tbl_cat_two_feat_six_bet ON tbl_property.prop_ID = tbl_cat_two_feat_six_bet.prop_ID WHERE cat_one_feat_eight_ID = 'c1f8_101' OR cat_two_feat_six_ID = 'c2f6_101' |
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > SQL query - Inner Joins |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|