Re: Sql loop Statement Hi nnraja
Rec
RecId Name Description locationId
1 Chicken chicken 1
2 Pizza Pizza 1
3 chickenbreast chickenbreast 2
and other table as RecItem
RecItemId ReciId ItemId locationId
1 1 23 1
2 1 24 1
3 1 26 1
4 2 43 1
5 2 52 1
6 3 23 2
7 3 42 2
I have to clone both these rec and recitem and i have to get result as follow
Rec
RecId Name Description
1 Chicken chicken
2 Pizza Pizza
3 chicken chicken
4 pizza pizza
RecItem
RecItemId ReciId ItemId
1 1 23
2 1 24
3 1 26
4 2 43
5 2 52
6 3 23
7 3 24
8 3 26
9 4 43
10 4 52
This is my table structure i have to clone based on the locationId
__________________ Shaalini.S Be the Best of Whatever you are... |