Link to home
Start Free TrialLog in
Avatar of Thom Gann
Thom GannFlag for United States of America

asked on

Querying XML dumps in SQL

I would like to know if there is a function that will search specific arguments buried in an XLM dump within the SQL table. I tried: select * from pcr where DATA LIKE '%682%' and I get the error: Msg 8116, Level 16, State 1, Line 1 Argument data type xml is invalid for argument 1 of like function.

Is there a function that will act the same as LIKE but work within XML?
ASKER CERTIFIED SOLUTION
Avatar of aaronakin
aaronakin
Flag of United States of America 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 Thom Gann

ASKER

PERFECT!! Coverting the data to varchar(max) allowed me to search, then I narrowed the search to the include the specific XML tags I needed and I found the data!! THANK YOU!!!