If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > Data insert from one table to other

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-06-07, 20:34
atulxp atulxp is offline
Registered User
 
Join Date: Jun 2007
Posts: 2
Data insert from one table to other

Could you please help me in this, In a script if I want to do following

I have two set of tables.

Table_T1

Table_T2_1, Table_T2_2, Table_T2_4, Table_T2_5,Table_T2_6

Each table in table set Table_T2_* contain data for one month only whereas table table_T1 contain data for multiple months.

I want to select Year & month from each of Table_T2_* & check if any record for that year month in Table T1

If yes then Insert those record in that table by load from cursor into respective table Table_T2_* . I want to do that in loop.

Ex:-

Suppose Table_T2_1 contain data for May-2005 so I need to load all May 2005 data from table Table_T1 to Table_T2_1, similarly if Table_T2_2 contain data for Nov-2005 then pick all records for Nov_2005 from Table_T1 & insert in Table_T2_2.

Thanks in advance
Reply With Quote
  #2 (permalink)  
Old 06-07-07, 02:41
pdreyer pdreyer is offline
Registered User
 
Join Date: May 2005
Location: South Africa
Posts: 1,268
This forum is for "Unix Shell Scripts"
I suggest you post this question in the relevant database forum
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On