Dear Friends,
Can anybody help me?
There are two tables which is having one to many relationship. So, how could you asign data in both tables into one dataset?
Thanks !
Dear Friends,
Can anybody help me?
There are two tables which is having one to many relationship. So, how could you asign data in both tables into one dataset?
Thanks !
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sourabh SharmaPosted Apr 3, 2008, 1:45 AM
u write a stored procedure n call it use ur name:
Select * from table1 as tb1 inner join table2 as tb2 on tb1.id=tb2.tb1id
it will then return you all the data from both tables based on the conditon is this what you were after?
Dinusha GamagePosted Apr 3, 2008, 12:56 AM
Dear Friend,
Thanks for you reply and I created the query below and it is working properly. So how do you define a stored procedure with this and call that procedure in C# 2005?
Select * from CM_CUSTHED as T1 inner join CM_CUSTDET as T2
on T1.cust_code = T2.cust_code
--Thanks ! --
Dinusha GamagePosted Apr 2, 2008, 11:33 PM
Grant SpiteriPosted Apr 2, 2008, 10:48 PM
Call a stored procedure that does the following for example:
Select * from table1 as tb1 inner join table2 as tb2 on tb1.id=tb2.tb1id
it will then return you all the data from both tables based on the conditon is this what you were after?