How to move data from one table to other table
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: How to move data from one table to other table

  1. #1
    Join Date
    Jan 2008
    Posts
    39

    How to move data from one table to other table

    Hello All,

    I do have one large table, say "emp" having 80 columns. now as the requirement changes, i have to partition the "emp" table to 8 tables.


    I want all of my existing data ["emp" table data] to be there in my new tables . i don't want to delete the existing data from "emp" table.

    Cal any one please help me out to resolve this issue.

    Thanks
    Prashant Hirani

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,554
    so... what's the problem?

    any reason why you can't use either "create table as" or "insert into select from"?
    Last edited by PAVB; 03-18-2008 at 05:59 AM.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  3. #3
    Join Date
    Jan 2008
    Posts
    39
    Thanks for reply.

    Mine Original table has 80 columns and sub tables has 10 columns each.

    I want to insert data according to that columns only from "emp" tables.

    will "insert into select from" work for this type of scnario or not?


    Thanks
    Prashant

  4. #4
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,554
    Quote Originally Posted by hirani_prashant
    Thanks for reply.

    Mine Original table has 80 columns and sub tables has 10 columns each.

    I want to insert data according to that columns only from "emp" tables.

    will "insert into select from" work for this type of scnario or not?


    Thanks
    Prashant
    In regards to splitting your 80 columns table into ten 10 columns each tables... what kind of business requirement is asking for such a thing?

    In regards to "insert into select from"... what do you think? have you even bothered to check the syntax?
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

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