Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2003
    Location
    Kalamazoo
    Posts
    42

    Angry Unanswered: Error while Inserting!!!!

    Hey folks,
    I am trying to updat a table by inserting values from another table into the parent table. The SQL being used is:
    "insert into "LogSchema"."_rt1182" select * from "LogSchema"."_rt557" where recordID not in (select * from "LogSchema"."_rt1182") ORDER BY TIMESTAMP"
    I have used the above statement and was successful, but with these two particluar tables I am getting an error message" Wrong number of values to INSERT"
    Please lemme know, what this means and how to correct this problem!
    TIA

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    You've used this code, and it worked at least once?

    -PatP

  3. #3
    Join Date
    Sep 2003
    Location
    Kalamazoo
    Posts
    42
    Originally posted by Pat Phelan
    You've used this code, and it worked at least once?

    -PatP
    Yes the code worked for other tables, but am facing the problem with these two particluar tables namely _rt1182 and _rt557!
    Any thoughts?
    TIA

  4. #4
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    How about this:

    insert into [LogSchema].[_rt1182] (<put_your_field_list_here>) select <put_your_field_list_here> from [LogSchema].[_rt557] r1 left outer join [LogSchema].[_rt1182] r2 on r1.recordID = r2.recordID where r2.recordID is null ORDER BY TIMESTAMP
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

Posting Permissions

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