|
| |
|
|
WIryeman
Posts: 14 Joined: 2/27/2003 Status: offline
|
Database help - 2/28/2003 10:16:13
This is an example of the tables I have now. ID N1
20Orange Log
40Green Bog
50Blue Dog
60Red Logg
75Yellow Frog Table2
ID PID P
20Orange Bog
40Green Log
50Blue Logg
60Red Frog
75Yellow Bog I am having a trouble updating a database I created, above. The original has 1075 records and 10 different PID and P columns so manual updating is unwanted. Below is an example of the Database end result I wish to have. ID N1
20Orange Log
40Green Bog
50Blue Dog
60Red Logg
75Yellow Frog Table2 ID PID P
20Orange 40Green Bog
40Green 20Orange Log
50Blue 60Red Logg
60Red 75Yellow Frog
75Yellow 40Green Bog I have tried update queries and Iif statements in the database but it keeps pulling in the ID field so ID and PID are the same. Not the result I want. Help!
|
|
|
|
WIryeman
Posts: 14 Joined: 2/27/2003 Status: offline
|
RE: Database help - 2/28/2003 11:41:45
UPDATE tbl1 INNER JOIN tbl2 ON (tbl1.ID = tbl2.PID) AND (tbl1.ID = tbl2.ID) SET tbl2.PID = [tbl1]![ID] WHERE (((tbl2.PID)=IIf([tbl2]![P]=[tbl1]![N1],[tbl1]![ID]," NA" ))); This is what I tried last, and in this case it cameback emtpy.
_____________________________
May Your Boots Dry Quickly
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|