Hi,
I have performed nested query to find out the ssn of a lawyer.

SELECT ...
FROM...
WHERE
( SELECT ...
...
...
);

And then I want to update the lawyer table (I am restricted to use only 1 exec) by this ssn that I just got from the query. So i type

Update Lawyers
SET ssn = L.ssn
WHERE ssn = L2.ssn;

L, L2 are defined in the nested queries

but I can't make this compile?

Can anyone tell me what's wrong?
(I don't exactly know generally how you update the entries in a table after performing queries, I am new to sql)

Thank you

Edmund