Hi
Wonder if someone can give me some pointers of what's wrong with this update statement
Use MYSQL all the item but SQL is slightly different & just starting although they are similar
Statement updates all lists.STOCKCODE with any StatusID can't get it to only update where lists.StatusID=16
Thanks in advance
Regards
Dave
Wonder if someone can give me some pointers of what's wrong with this update statement
Use MYSQL all the item but SQL is slightly different & just starting although they are similar
Code:
update
lists
set
lists.STOCKCODE = (select stock.STOCKCODE
from stock
where lists.ID = stock.ID)
where EXISTS(select lists.StatusID from lists where lists.StatusID=16)
Statement updates all lists.STOCKCODE with any StatusID can't get it to only update where lists.StatusID=16
Thanks in advance
Regards
Dave