select o.orderid,o.shipaddress1,o.shipaddress2,n.note from orders o left join notes n on o.orderid=n.orderid where n.note like %o.shipaddress1% order by orderid desc
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'o'.
i want to select rows where n.note contains the value of o.shipaddress1
not equal but contains