DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: How to split 1 table into several tables?

  1. #1
    Join Date
    Nov 2003
    Location
    Almere
    Posts
    1

    How to split 1 table into several tables?

    Hi there,

    I'm new with SQL, bat have some experiance with mysql/PHP.

    I've succesfully imported a CSV file with SQLoader into a table(TEST) it contains firtsname, lastname, adres, zipcode, city.

    Now I want to split the table test into two tables linked with id.
    it must be something like this (I hope),

    create table split1,slpit2

    query :=select * from TEST;
    result :=SQL(query)
    rows :=SQL_fetch_array(result)

    while rows

    INSERT INTO SPLIT1,SPLIT2 (split1.firstname,split1.lastname,split2.adres,split2.zipcode,split2.city) VALUES (value[0],value[1],value[2],value[3],value[4])

    end;

    Please advise how to proceed,

    Marcel Planting

  2. #2
    Join Date
    Mar 2001
    Location
    Reading, U.K
    Posts
    598
    There something called INSERT ALL in 9.x check that.
    Cheers!
    OraKid.

Posting Permissions

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


Click Here to Expand Forum to Full Width