copying data one table to another table in sql

  • Hi Friends , whever i load data from one table to another table data load incoorectly. why data come incorrectly. plz tell me

    suppose table1 data like id , name ,sal

    1 , ravi , 1200

    2 , vebal , 1400

    3 , gali , 1780

    4 , yelo , 4500

    before loading table 2 data is empty.when ever i inserts tabl1 data into table 2 that time data load incorrectly .

    table 2 data like id , name , sal

    ? , ? , ?

    ? , ? , ?

    ? , ? , ?

    ? , ? , ?

    Plz tell me Reasion.

  • Hi asranantha,

    1) please supply the full CREATE TABLE sql (including table name) of both tables.

    2) how is the data being copied? Using SQL? Using a tool? Please provide full SQL or full name of tool and what you are doing when using the tool.

    3) Are you receiving any error messages or notification messages? Please provide the full text of all messages.

  • vicdileo (4/24/2012)


    Hi asranantha,

    1) please supply the full CREATE TABLE sql (including table name) of both tables.

    2) how is the data being copied? Using SQL? Using a tool? Please provide full SQL or full name of tool and what you are doing when using the tool.

    3) Are you receiving any error messages or notification messages? Please provide the full text of all messages.

    +1

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • iam useing tables in sql server.if records comes anothere table incorrectly.

  • Please post the DDL of the tables. May be the table fields are not of the same data types in both tables....Check the link in my signature to see how to post DDL and sample data.

    Also tell us how you are copying the data.

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • select * into table2 from table1

    This query will automatically create table2 in your database.You can modify the above query as

    per your need.Many times i had use this query in Sql server 2008.:-)

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply