Doing a Subquery in SQL
For my own future reference... This will lookup a value (emailaddress) from table2, to use in where clause in table1.
select *
from table1
where EmailAddress = (select EmailAddress from table2 where UserID = '#URL.UID#')
from table1
where EmailAddress = (select EmailAddress from table2 where UserID = '#URL.UID#')


There are no comments for this entry.
[Add Comment]