Jump to content

SQL Help


4Vikram

Recommended Posts

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. 

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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 

Link to comment
Share on other sites

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. 

Related image

Link to comment
Share on other sites

43 minutes ago, Suhaas said:

sorry Bro.Not sure I understand clearly.   

NP guess I figured out its okay

6 minutes ago, Bhai said:

Related image

what re nasty bhai ikada kuda spamming doing brahmi5.gif?1369595063

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...