0

I want to retrieve the data based on equaling to resourceID ,I have writtten below query

SELECT t.* FROM customerservice_store t WHERE 
existsNode(t.RESPONSE,'/customerDetailsResponse/resources/physicalDevice/@resourceId="bharath"','xmlns="http://sso.message.upc.com"') ='1';

SELECT t.* FROM customerservice_store t WHERE
existsNode(t.RESPONSE,'/customerDetailsResponse/resources/physicalDevice/@resourceId="bharath"','xmlns="http://sso.message.upc.com"') ='1';
3
  • Have you see this: stackoverflow.com/questions/21293817/… ? Commented May 9, 2017 at 7:41
  • Please tag with the actual RDBMS (product and version), please add a sample for input and expected outoput and please read How to ask a good SQL question and How to create a MCVE Commented May 9, 2017 at 10:20
  • existsNode seems to be Oracle... Anyway - by guessing - I get the feeling, that you are not looking for the existance of your resourceID anywhere, but you rather want to find the node, where the @resourceId equals a given value. Read about XQuery predicates. You might try something like ..... /physicalDevice[@resourceId="xyz"]/ ... Commented May 9, 2017 at 10:24

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.