Pages

Thursday, August 1, 2024

Are There Any Microsoft Access Users Out There?

 I used to know SQL.  I wrote queries every day.  But it was not Access.  SQL is different.

A simple example: TABLE2 has a field VEHICLE.  0 is never a valid value.

I think 

UPDATE TABLE2.VEHICLE=' ' WHERE TABLE2.VEHICLE = 0;

should do the job.  What am I doing wrong?  

Should be:

UPDATE TABLE2.VEHICLE=null WHERE TABLE2.VEHICLE = 0;

It would help if saving queries in Access actually saved them.

1 comment:

  1. You are missing a few key parts.

    The general form of an update query (even in MS Access) is:

    UPDATE
    [table]
    SET
    [column]=[value]
    WHERE
    [conditional test]

    ReplyDelete