4Vikram Posted August 23, 2017 Report Posted August 23, 2017 Okay I have three tables and i want to move data from one table to two different tables.. So here is the requirement, Table A - Staging table and have columns like Column1, Column2,Column3,Column4 Table B - Have columns like EID, Col1,Col2,Col3 Table C - Have columns like EID, Column1, Column2,Column3,Column4 So what I want is, INSERT INTO Table B (Col1) NOTE: (EID have a trigger which populates based on Max EID + 1) SELECT FROM Table A ('AB') -- AB is hard coded adhe requirement So idhi oka insert anukondi simultaneously i want to insert into Table C with EID from Table B with respective to matching row from Table A so final ga conclusion endi ante Table A Colum1, Column2 respective ID created during insert into Table B should go into Table C with Columns from Table A. Quote
4Vikram Posted August 23, 2017 Author Report Posted August 23, 2017 10 minutes ago, BostonBullodu said: eh database baa MS SQL baa Quote
Suhaas Posted August 23, 2017 Report Posted August 23, 2017 32 minutes ago, 4Vikram said: Okay I have three tables and i want to move data from one table to two different tables.. So here is the requirement, Table A - Staging table and have columns like Column1, Column2,Column3,Column4 Table B - Have columns like EID, Col1,Col2,Col3 Table C - Have columns like EID, Column1, Column2,Column3,Column4 So what I want is, INSERT INTO Table B (Col1) NOTE: (EID have a trigger which populates based on Max EID + 1) SELECT FROM Table A ('AB') -- AB is hard coded adhe requirement So idhi oka insert anukondi simultaneously i want to insert into Table C with EID from Table B with respective to matching row from Table A so final ga conclusion endi ante Table A Colum1, Column2 respective ID created during insert into Table B should go into Table C with Columns from Table A. If this is a trigger on Table A to insert into Table B same aa trigger lo ne after calculating EID write an insert statement to insert into Table C bro. P.S: I may have understood your requirement incorrectly. This is based on how and what I understood. Quote
4Vikram Posted August 23, 2017 Author Report Posted August 23, 2017 3 minutes ago, Suhaas said: If this is a trigger on Table A to insert into Table B same aa trigger lo ne after calculating EID write an insert statement to insert into Table C bro. P.S: I may have understood your requirement incorrectly. This is based on how and what I understood. it wont work because aa table is generic one adi vere vatilo use chestaru so work out kadu Quote
Suhaas Posted August 23, 2017 Report Posted August 23, 2017 3 minutes ago, 4Vikram said: it wont work because aa table is generic one adi vere vatilo use chestaru so work out kadu Bro.Not sure I understand clearly. Quote
Bhai Posted August 23, 2017 Report Posted August 23, 2017 31 minutes ago, 4Vikram said: Okay I have three tables and i want to move data from one table to two different tables.. So here is the requirement, Table A - Staging table and have columns like Column1, Column2,Column3,Column4 Table B - Have columns like EID, Col1,Col2,Col3 Table C - Have columns like EID, Column1, Column2,Column3,Column4 So what I want is, INSERT INTO Table B (Col1) NOTE: (EID have a trigger which populates based on Max EID + 1) SELECT FROM Table A ('AB') -- AB is hard coded adhe requirement So idhi oka insert anukondi simultaneously i want to insert into Table C with EID from Table B with respective to matching row from Table A so final ga conclusion endi ante Table A Colum1, Column2 respective ID created during insert into Table B should go into Table C with Columns from Table A. Quote
4Vikram Posted August 23, 2017 Author Report Posted August 23, 2017 43 minutes ago, Suhaas said: Bro.Not sure I understand clearly. NP guess I figured out its okay 6 minutes ago, Bhai said: what re nasty bhai ikada kuda spamming doing Quote
Suhaas Posted August 23, 2017 Report Posted August 23, 2017 8 minutes ago, 4Vikram said: NP guess I figured out its okay Sure Bro. Post what you did, if you can. Quote
4Vikram Posted August 23, 2017 Author Report Posted August 23, 2017 5 minutes ago, Suhaas said: Sure Bro. Post what you did, if you can. sure Quote
RamGopalVarma Posted August 24, 2017 Report Posted August 24, 2017 you need to use SSIS to move data from Staging to Warehouse Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.