Database woes.

Results 1 to 6 of 6

Thread: Database woes.

  1. #1
    Conrad Guest

    Default Database woes.

    What is the best method for copying three records from a table back into the same table and changing just one field?<BR><BR>Thanks for any help,<BR>Conrad

  2. #2
    Join Date
    Dec 1969

    Default RE: Database woes. "", conn, 3, 3<BR><BR>WHile not rs.eof<BR>rs("fieldname") = variableused<BR>rs.movenext<BR>loop<BR>rs.update<B R>rs.close<BR>conn.close<BR><BR>etc.<BR><BR>HTH<BR >Dave

  3. #3
    Join Date
    Dec 1969

    Default Copying????

    Do you mean you want to create three *NEW* records that differ from the old records only in one field?<BR><BR>Or do you want to modify the existing records?<BR><BR>And what DB are you using??<BR><BR>

  4. #4
    Conrad Guest

    Default Not just changing...

    I am not just changing a field, I need to copy three rows and whilst changing one field to a new value.<BR><BR>Three rows become six with an ID field I specify being renamed.

  5. #5
    Conrad Guest

    Default RE: Copying????

    Yes, I wish to create new records whilst renaming an ID field.

  6. #6
    Join Date
    Dec 1969

    Default RE: Database woes.

    Try something like this,<BR><BR>INSERT tableName (fld1, fld2)<BR>SELECT fld1, &#039;new val&#039;<BR>FROM tableName<BR>WHERE fld1 = &#039;some val&#039;

Posting Permissions

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