one custid contains 10 members using joins

Posted by Ashwini.bijja under Sql Server on 1/19/2012 | Points: 10 | Views : 910 | Status : [Member] | Replies : 1
Two tables
1.FIRST TABLE CUSTID IS PRIMARY KEY
2.SECOND TABLE CUSTID FOREIGN KEY
SUPPOSE CUSTID IS 10 IN FIRST TABLE THEN USING THAT ID
INSERT 10 MEMBERS IN SECOND TABLE

SEND ME THE QUERY ITS URGENT




Responses

Posted by: Sksamantaray on: 1/19/2012 [Member] Silver | Points: 25

Up
0
Down
Two tables
1.FIRST TABLE CUSTID IS PRIMARY KEY
2.SECOND TABLE CUSTID FOREIGN KEY
SUPPOSE CUSTID IS 10 IN FIRST TABLE THEN USING THAT ID
INSERT 10 MEMBERS IN SECOND TABLE
You can write 2-procedures
1- to insert data to first table
2-to insert data to 2nd table
The first procedure will return a value , in your case lets assume it returns custid=10
Then you pass parameters to the 2nd procedure where custid value will be fixed i.e 10
continue adding 10...11..as many no of records you want.

For that you can have 2 grids in front end with Add record.
When you click on + of a row of 1st grid it should take the customer id of that row i.e 10 in your case.



Thanks,
Sanjay

Ashwini.bijja, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response