please help.. urgent!!!insert-sql

  • insert into otherdb..table select * from activedb..table

    Server: Msg 213, Level 16, State 1, Line 1

    Insert Error: Column name or number of supplied values does not match table definition.

    I have been receiving this error msg..what's wrong with my code?

  • I have already this code

    select * into otherdb..table from active..table

    but i have existing table in otherdb and i dont want to create new table.

    fro jeff_astro27

  • Hi there,

    Did you check if the number of columns in the otherdb..table matches the number of columns in the activedb..table?

    I would suggest this:

    INSERT INTO otherdb..table (list_of_columns)

    SELECT list_of_columns FROM activedb..table

    Regards,

    Oana.

Viewing 3 posts - 1 through 2 (of 2 total)

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