export tables

Discussion in 'Databases' started by mrbig2, Oct 18, 2010.

  1. #1
    Hi,

    I want to export some fields (username, password, email) from a table. Can someone advise me how to do this?

    Thanks!
     
    mrbig2, Oct 18, 2010 IP
  2. graformix

    graformix Member

    Messages:
    92
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #2
    Take a look at the link in my profile .A lot of DB migration tools are available there :)
     
    graformix, Oct 18, 2010 IP
  3. hirensoni913

    hirensoni913 Peon

    Messages:
    79
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    insert into database1..tablename (username,passwor,email)
    select username, password, email from originaldatabase..tablename
     
    hirensoni913, Oct 19, 2010 IP
  4. ovidiu77

    ovidiu77 Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    is it oracle, mysql, postgresql, etc....db?
     
    ovidiu77, Oct 20, 2010 IP
  5. kkrawal

    kkrawal Peon

    Messages:
    235
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    try this. Suppose your table name is table1

    select username,'|',password,'|',email,'|' into outfile '/tmp/x.txt' from table1 order by username

    This is in Mysql
    Now you have a text file with '|' separated files, all the database packages can import this.
     
    kkrawal, Nov 13, 2010 IP
  6. teamaguilar

    teamaguilar Peon

    Messages:
    197
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    For exporting the table values, you can create SSIS package. This is in MS SQL 2005
     
    teamaguilar, Nov 21, 2010 IP