Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2004
    Posts
    2

    Cool Unanswered: 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

  2. #2
    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

  3. #3
    Join Date
    Aug 2004
    Posts
    2
    Thanks, I was so close....

  4. #4
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •