Results 1 to 2 of 2

Thread: HELP !!!!!!!!!!!!!!!!!!

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 1999
    Location
    UK
    Posts
    300
    Hi
    How do I update a whole record in one statement.
    I want to update a table with the record from an identicle table but has slightly different values. The tables each have 81 fields so I dont want to have to set all the values as this would take ages to write. I just want to say something like this:

    update reeldata where reelstore!number = reeldata!number

    and have the whole record written at once.

    How do I do this , every thing I have read in the help screen involves setting the fields.

    Thanxs
    Locutus
    Resistance is futile

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Exclamation

    You can run an SQL statement. Lets say I have 2 tables (Table1 and Table2). These two tables have common field (FieldId), now I want to update Table2.FieldNumber with the one in Table1 :

    Code:
    'Table1
    FieldId
    FildNumber
    
    
    'Table2
    FieldId
    FildNumber
    FieldText
    
    
    'Here is the Update statement
    Update Table2
    Set Table2.FieldNumber = Table1.FieldNumber
    From Table2, Table1
    Where Table2.FieldId = Table1.FieldId

Posting Permissions

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



Click Here to Expand Forum to Full Width