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 > ANSI SQL > NewB- Selected Data transfer from tables

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-09-04, 19:10
stoneyos stoneyos is offline
Registered User
 
Join Date: Aug 2004
Posts: 2
Cool NewB- Selected Data transfer from tables

New to the forums and SQL and need help to solve a tech support issue.
I need to export selected data from one table into a new table.

fields: NAME_LAST, NAME_FIRST, PURCHASE_ACCOUNT_BALANCE, EVENT_CREDIT_BALANCE
from table: C_CUSTOMER
where: EVENT_CREDIT_BALANCE, PURCHASE_ACCOUNT_BALANCE > 0

into new table: APPLE_CUSTOMERS

Any help would be great. My iterations haven't worked and I don't have my SQL book here and my searches aren't helping.
I am using interbase.
Thanks
Reply With Quote
  #2 (permalink)  
Old 08-10-04, 01:13
orababa@kshema orababa@kshema is offline
Registered User
 
Join Date: Nov 2003
Location: Bangalore,India
Posts: 51
insert into apple_customers(NAME_LAST, NAME_FIRST, PURCHASE_ACCOUNT_BALANCE, EVENT_CREDIT_BALANCE
) select NAME_LAST, NAME_FIRST, PURCHASE_ACCOUNT_BALANCE, EVENT_CREDIT_BALANCE
from C_CUstomers where
EVENT_CREDIT_BALANCE>0 AND PURCHASE_ACCOUNT_BALANCE > 0


or

insert into apple_customers(NAME_LAST, NAME_FIRST, PURCHASE_ACCOUNT_BALANCE, EVENT_CREDIT_BALANCE
) as select NAME_LAST, NAME_FIRST, PURCHASE_ACCOUNT_BALANCE, EVENT_CREDIT_BALANCE
from C_CUstomers where
EVENT_CREDIT_BALANCE>0 AND PURCHASE_ACCOUNT_BALANCE > 0
Reply With Quote
  #3 (permalink)  
Old 08-10-04, 16:23
stoneyos stoneyos is offline
Registered User
 
Join Date: Aug 2004
Posts: 2
Thanks, I was so close....
Reply With Quote
  #4 (permalink)  
Old 08-11-04, 05:47
orababa@kshema orababa@kshema is offline
Registered User
 
Join Date: Nov 2003
Location: Bangalore,India
Posts: 51
Go to MS-Access.
Goto tables pane.
Right click->Import
Choose ms excel as Files of type. Specifiy the file and import the data
No rename the table name into all CAPITAL LETTERS

Right click on newly created table.
Export.
Choose ODBC Databases as Files of Type.
Choose the DSN . (If you havent created then goto control panel->administrative->ODBC. create as System DSN)

and then you are done
Cheers
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