I have two tables, one holding Floor data (L0 table) and the other Room data (A0 table) which have many columns, but those of interest look something like:
L0 
--------------------------------
auto_key     BLDGCODE   FLOORCODE
--------     --------   ---------
aaaaaaaa     CA0090        01
bbbbbbbb     CA0090        02
cccccccc     CA0090        03
11111111     GB0100        00
22222222     GB0100        01
zzzzzzzz     GB0200        00
A0 (Rooms)
------------------------------------------------
BLDGCODE      FLOORCODE     ROOMID     FloorID
--------      ---------     ------     -------
CA0090           01         01.123
CA0090           01         01.234
CA0090           01         01.345
CA0090           02         02.123
CA0090           02         02.234
CA0900           03         03.123
I want to take the value of auto_key from the L0 table and update the A0 table with that value where the BLDGCODE and FLOORCODE values match.
So I end up with:
A0
--------------------------------------------
BLDGCODE    FLOORCODE    ROOMID     FloorID
--------    ---------    ------     -------
CA0090         01        01.123     aaaaaaaa
CA0090         01        01.234     aaaaaaaa
CA0090         01        01.345     aaaaaaaa
CA0090         02        02.123     bbbbbbbb
CA0090         02        02.234     bbbbbbbb
CA0900         03        03.123     cccccccc
Can anyone please help?
Thanks
