Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Location
    California
    Posts
    502

    Unanswered: Multiple Update fields . . .

    Access 2003

    I have about five date fields that are in a text format.

    If I run just one of the below queries it works fine.

    How can i run multiple queries for all of the fields at one time?

    I don't believe UNION or UNION ALL will work here.

    Code:
    UPDATE tblSandicordata SET [pending date] = Datevalue([pending date])
    WHERE tblSandicordata.[pending date] Is Not Null
    
    UPDATE tblSandicordata SET [listing date] = Datevalue([listing date])
    WHERE tblSandicordata.[listing date] Is Not Null
    Thanks . . . Rick

    Reading some of my own earlier postings I tried as suggested to me, in making the changes while validating the import text file. Worked perfectly for the entire table!!!

    Rick
    Last edited by Rick Schreiber; 04-23-14 at 19:04. Reason: Found an answer

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Code:
    update mytable
    set textcolumna="A", textcolumnb = "B", numericcolumn1 = 1, datecolumn = #2014/04/21#
    where.......
    assuming that the where clause is consistent for all the columns
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Mar 2004
    Location
    California
    Posts
    502

    I had something similar . . .

    But it wasn't working well.

    My imports failed because I wasn't matching the import spec settings correctly.

    My text import date fields were Y-M-D and my import settings were M/Y/D so the import failed every time.

    Once I corrected this the import formatted perfectly every time.

    Someone had suggested this to me a few years ago but I just couldn't grasp it then.

    Thanks healdem . . .

    Rick

Posting Permissions

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