i want to fetch data from two tables

Posted by Sakshi.1947 under Sql Server on 10/9/2012 | Points: 10 | Views : 982 | Status : [Member] | Replies : 3
i want to fetch data from two tables h1 and h2 based on serial number which is same in both tables and fields are same in both table only difference is that language is different.serial number is unique but not primary key.
and i have two drop down list which shows the business type.i want to show data from both tables where business type is selected either on first dropdown list or on second.how it can be possible..can anybody help me.




Responses

Posted by: Britsouls on: 10/10/2012 [Member] Starter | Points: 25

Up
0
Down
u can use inner join query..

Sakshi.1947, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sakshi.1947 on: 10/15/2012 [Member] Starter | Points: 25

Up
0
Down
i have tried inner join but it works only for a single row.if there is more then one row then it return error.

Sakshi.1947, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sourabh07 on: 10/15/2012 [Member] Starter | Points: 25

Up
0
Down
will you please describe the fields of both the tables....

eg; table1 has

id name
----------- --------------------------------------------------
1 A
2 B
3 C

and table2 has

id name language
----------- --------------------------------------------------
1 A hindi
2 B english
3 C punjabi

Sourabh07

Sakshi.1947, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response