insert into T1
(select C4, C4, ' ' from T2)
I think this is what you are looking for.
but I think you may have mistyped that you wanted C4 twice
Alan Shore
Programmer/Analyst, Distribution
E:AShore@xxxxxxxxxxx
P:(631) 200-5019
C:(631) 880-8640
"If you're going through Hell, keep going" - Winston Churchill
                                                                       
             David FOXWELL                                             
             <David.FOXWELL@ag                                         
             ipi.com>                                                   To
             Sent by:                  Midrange Systems Technical      
             midrange-l-bounce         Discussion                      
             s@xxxxxxxxxxxx            <midrange-l@xxxxxxxxxxxx>       
                                                                        cc
                                                                       
             04/01/2009 09:14                                      Subject
             AM                        SQL Inserting from one table to 
                                       another with different column names
                                                                       
             Please respond to                                         
             Midrange Systems                                          
                 Technical                                             
                Discussion                                             
             <midrange-l@midra                                         
                 nge.com>                                              
                                                                       
                                                                       
Hi,
IF I have table T1 with columns C1, C2, C3, and T2 with columns C4 and C5.
How do finish my sql statement :
Insert into T1
Select from T2
I want C4 to go to C1 and C4 to C2 with C3 blank.
Thanks
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: 
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at 
http://archive.midrange.com/midrange-l..
 
As an Amazon Associate we earn from qualifying purchases.