Link to home
Start Free TrialLog in
Avatar of rgb192
rgb192Flag for United States of America

asked on

select column where value of another column is contained

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
ASKER CERTIFIED SOLUTION
Avatar of Raja Jegan R
Raja Jegan R
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rgb192

ASKER

thanks