Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2011
    Location
    Charleston, SC
    Posts
    12

    Unanswered: Is there a easier way to clone a record.

    I'm working on a script to create new records in a Multi-Value table.
    The new records will have almost the same information another record in the table, except in three fields.

    I can easily go locate the old record and do a insert of a new record into the table with the values I want, using the saved values from the old table.

    I just want to know if there is an easier way that I may not know about.


    as yes..I did google it first.

    thanks in advance

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >I'm working on a script to create new records in a Multi-Value table.
    EXACTLY what do you consider to be a "multi-value" table?
    post DDL & DML that demonstrate what you mean along with explanation
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Jan 2011
    Location
    Charleston, SC
    Posts
    12
    let me clarify

    I have table that has like

    ID Term_Code APPL_No SEQ_NO APPC_DATA APPC_CODE ....
    1 sp200 1 1 w SW
    1 sp200 1 2 w DE
    2 sp200 1 1 w DE
    2 sp200 1 2 w SW
    2 fl100 1 3 w AB
    2 fl100 1 4 w FE

    If I wanted to create a new record for person 1 where APPC_CODE =AB using the same data that is in the record where the APPC_CODE is SW

    is there some neat clone command?

  4. #4
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >is there some neat clone command?
    CLONE is not valid SQL DML.
    Only available options are INSERT, UPDATE, or DELETE.
    new records are made using INSERT so compose SQL that meets your requirements
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Tags for this Thread

Posting Permissions

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