This ought to be simple but I can't seem to get the syntax right:
[tt]Update recordings set Label=(select LabelID from Labels where label=LabelName)[/tt]
I'll try to explain: the table "recordings" has a field "Label" that is currently text, but I am attempting to repopulate it with the numeric "LabelID" from the "labels" table, which has the matching text in its "LabelName" field. In other words, where Label=LabelName, the LabelID needs to replace the value currently in Label.
This is a one time query string and won't need to be run again once it does its job. Can anyone help? Don
don@pc-homepage.com
Experienced in HTML, Perl, VBScript, PWS, IIS and Apache. Run OS/2 Warp 4, BeOS v5 and Windows NT/2000 (only when I have to!)
[tt]Update recordings set Label=(select LabelID from Labels where label=LabelName)[/tt]
I'll try to explain: the table "recordings" has a field "Label" that is currently text, but I am attempting to repopulate it with the numeric "LabelID" from the "labels" table, which has the matching text in its "LabelName" field. In other words, where Label=LabelName, the LabelID needs to replace the value currently in Label.
This is a one time query string and won't need to be run again once it does its job. Can anyone help? Don
don@pc-homepage.com
Experienced in HTML, Perl, VBScript, PWS, IIS and Apache. Run OS/2 Warp 4, BeOS v5 and Windows NT/2000 (only when I have to!)