How can i copy data

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • thaar al_taiey

    How can i copy data

    hi their,

    How can i copy data in MS-SQL 2000 from one table to another with
    different charactristic?


    thanks

    *** Sent via Developersdex http://www.developersdex.com ***
  • John Bell

    #2
    Re: How can i copy data

    Hi

    It will depend on how different the structures are, and where the tables are
    located!

    Posting DDL and example data will help to answer your question see
    http://www.aspfaq.com/etiquett­­e.asp?id=5006. It is also useful to post
    your current attempts at solving the problem.

    If your table does not contain any data and there is a simple correlation
    between columns then you can use the insert statement. See Books online for
    more details on the statements available and their syntax.

    INSERT INTO Table2 ( ColX, ColY, ColZ )
    SELECT Col1, Col2, Col3
    FROM Table1

    If your tables are on different machines or if this is a regular task then
    you may want to use DTS or possibly BCP.

    John

    "thaar al_taiey" <thaar@hotmail. com> wrote in message
    news:424e821d$1 _1@127.0.0.1...[color=blue]
    > hi their,
    >
    > How can i copy data in MS-SQL 2000 from one table to another with
    > different charactristic?
    >
    >
    > thanks
    >
    > *** Sent via Developersdex http://www.developersdex.com ***[/color]


    Comment

    • thaar al_taiey

      #3
      Re: How can i copy data

      dear john,
      the problem is:
      I have serveral sepearted MS-SQL 2000 DB's all with data and integrity
      constraints. Now i create a single ms-sql DB to contain all old DB's.
      How can i transfer the data to new tables with little losing?

      v. thanks

      thaar



      *** Sent via Developersdex http://www.developersdex.com ***

      ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
      http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
      ----= East and West-Coast Server Farms - Total Privacy via Encryption =----

      Comment

      • John Bell

        #4
        Re: How can i copy data

        Hi

        You may be able to use the Import/Export Wizard which calls DTS to move the
        objects and data, see


        Alternatively you can script the database9s) for an example see:
        http://www.aspfaq.com/etiquette.asp?id=5006 and use BCP/Bulk Insert, even if
        you are using DTS to transfer the data if may be worth creating the
        structure of the new database first, possibly without any foreign keys and
        then add them later.

        John


        "thaar al_taiey" <thaar@hotmail. com> wrote in message
        news:424fd7d7$1 _1@127.0.0.1...[color=blue]
        > dear john,
        > the problem is:
        > I have serveral sepearted MS-SQL 2000 DB's all with data and integrity
        > constraints. Now i create a single ms-sql DB to contain all old DB's.
        > How can i transfer the data to new tables with little losing?
        >
        > v. thanks
        >
        > thaar
        >
        >
        >
        > *** Sent via Developersdex http://www.developersdex.com ***
        >
        > ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet
        > News==----
        > http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+
        > Newsgroups
        > ----= East and West-Coast Server Farms - Total Privacy via Encryption
        > =----[/color]


        Comment

        Working...