Hi there,
I am trying to create a form based on a MySQL table “Assessment”. This form contains a SELECT field which is linked to a second table called “Item”.
The SELECT field is supposed to display 2 fields of the Item table --> “Itemcode” and “Itemname”.
The field Itemcode again is a foreign key on the Item table; its real name is defined in a third table called “Code” (field “Codename”).
So far, I have used the following SELECT statement:
SELECT iditem, sc_concat(code_idcode, ’ - ', name)
FROM item
ORDER BY name
Now, when using the SELECT field, it only shows the foreign key ID of the Itemcode together with the Itemname, e.g.:
" 54 - Surface Conditioning ".
How is it possible to display the real name of Itemcode (contained in third table “Code”) instead of the foreign key ID? The correct result is supposed to look like this:
" Df4 - Surface Conditioning "
(–> Df4 is stored in table “Code”, field “Codename”).
Thank you in advance and kind regards
Gustav