-
Solved: Upadating from one table to another
Hello,
I have 2 tables:
dbo_pmf (including columns qpc & short_name)
dbo_spt (including spt_sptlvl_val & spt_lvl_desc)
I am not sure if this is even possible, but I want to update the spt_lvl_desc column in dbo_spt, using the value from short_name in dbo_pmf, where qpc = spt_sptlvl_val.
I am using MS access.
I've tried various options, but can't seem to get it to work.
Is it possible, and can anyone help me??
Many thanks,
Adrian
-
just guessing; but the dbo_ in your table names suggests they are linked. You cannot update linked tables unless you have specified a unique key for each used in your query. Stan
-
Thanks, it's OK, i've solved the problem with the following:
UPDATE dbo_spt
INNER JOIN dbo_pmf ON dbo_spt.spt_sptlvl_val=dbo_pmf.qpc
SET spt_lvl_desc = dbo_pmf.short_name;
Adrian
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules