dbTalk Databases Forums  

bind parameter in existsnode function

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss bind parameter in existsnode function in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ajmastrean
 
Posts: n/a

Default bind parameter in existsnode function - 05-16-2008 , 09:29 AM






I am trying to bind a parameter as the parameter to the existsnode()
function.

select extract(trans_details,'/Transaction/Details/
Key').getStringVal()
from transaction_audit
where existsnode(trans_details, :xml_value) = 1

the value I want to pass in (and that works when used in-line) is

'//Key[@Value=''True''] and //Key[@Name=''Validation Status'']'

the xml snippet that exists inside the trans_details column is

<Key Name="Validation Status" Value="True"/><Key
Name="Authentication Status" Value="False"/>

Reply With Quote
  #2  
Old   
Mark D Powell
 
Posts: n/a

Default Re: bind parameter in existsnode function - 05-17-2008 , 09:32 PM






On May 16, 10:29*am, ajmastrean <ajmastr... (AT) gmail (DOT) com> wrote:
Quote:
I am trying to bind a parameter as the parameter to the existsnode()
function.

* * *select extract(trans_details,'/Transaction/Details/
Key').getStringVal()
* * *from transaction_audit
* * *where existsnode(trans_details, :xml_value) = 1

the value I want to pass in (and that works when used in-line) is

* * *'//Key[@Value=''True''] and //Key[@Name=''Validation Status'']'

the xml snippet that exists inside the trans_details column is

* * *<Key Name="Validation Status" Value="True"/><Key
Name="Authentication Status" Value="False"/

You stated what you wanted to do but not what the problem is?
What Oracle error are you getting?
What is the full version of Oracle?
What tool are you using?

HTH -- Mark D Powell --


Reply With Quote
  #3  
Old   
Mark D Powell
 
Posts: n/a

Default Re: bind parameter in existsnode function - 05-17-2008 , 09:32 PM



On May 16, 10:29*am, ajmastrean <ajmastr... (AT) gmail (DOT) com> wrote:
Quote:
I am trying to bind a parameter as the parameter to the existsnode()
function.

* * *select extract(trans_details,'/Transaction/Details/
Key').getStringVal()
* * *from transaction_audit
* * *where existsnode(trans_details, :xml_value) = 1

the value I want to pass in (and that works when used in-line) is

* * *'//Key[@Value=''True''] and //Key[@Name=''Validation Status'']'

the xml snippet that exists inside the trans_details column is

* * *<Key Name="Validation Status" Value="True"/><Key
Name="Authentication Status" Value="False"/

You stated what you wanted to do but not what the problem is?
What Oracle error are you getting?
What is the full version of Oracle?
What tool are you using?

HTH -- Mark D Powell --


Reply With Quote
  #4  
Old   
Mark D Powell
 
Posts: n/a

Default Re: bind parameter in existsnode function - 05-17-2008 , 09:32 PM



On May 16, 10:29*am, ajmastrean <ajmastr... (AT) gmail (DOT) com> wrote:
Quote:
I am trying to bind a parameter as the parameter to the existsnode()
function.

* * *select extract(trans_details,'/Transaction/Details/
Key').getStringVal()
* * *from transaction_audit
* * *where existsnode(trans_details, :xml_value) = 1

the value I want to pass in (and that works when used in-line) is

* * *'//Key[@Value=''True''] and //Key[@Name=''Validation Status'']'

the xml snippet that exists inside the trans_details column is

* * *<Key Name="Validation Status" Value="True"/><Key
Name="Authentication Status" Value="False"/

You stated what you wanted to do but not what the problem is?
What Oracle error are you getting?
What is the full version of Oracle?
What tool are you using?

HTH -- Mark D Powell --


Reply With Quote
  #5  
Old   
Mark D Powell
 
Posts: n/a

Default Re: bind parameter in existsnode function - 05-17-2008 , 09:32 PM



On May 16, 10:29*am, ajmastrean <ajmastr... (AT) gmail (DOT) com> wrote:
Quote:
I am trying to bind a parameter as the parameter to the existsnode()
function.

* * *select extract(trans_details,'/Transaction/Details/
Key').getStringVal()
* * *from transaction_audit
* * *where existsnode(trans_details, :xml_value) = 1

the value I want to pass in (and that works when used in-line) is

* * *'//Key[@Value=''True''] and //Key[@Name=''Validation Status'']'

the xml snippet that exists inside the trans_details column is

* * *<Key Name="Validation Status" Value="True"/><Key
Name="Authentication Status" Value="False"/

You stated what you wanted to do but not what the problem is?
What Oracle error are you getting?
What is the full version of Oracle?
What tool are you using?

HTH -- Mark D Powell --


Reply With Quote
  #6  
Old   
ajmastrean
 
Posts: n/a

Default Re: bind parameter in existsnode function - 05-19-2008 , 11:39 AM



Oops! I got caught up in describing what I was trying to do that I
completely forgot to post the problematic result. When I try to
execute the query above, with the bind value specified above, I get
the following error...

---
An error was encountered performing the requested operation:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00601: Invalid token in: ''//Key[@Value=''True''] and //
Key[@Name=''Validation Status'']''
---

I have also tried removing the surrounding single quotes from the bind
value

---
An error was encountered performing the requested operation:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00601: Invalid token in: '//Key[@Value=''True''] and //
Key[@Name=''Validation Status'']'
---

Installed -- Oracle Data Access Components 10.2.0.2.21
Tool -- Oracle SQL Developer 1.0.0.15

Reply With Quote
  #7  
Old   
ajmastrean
 
Posts: n/a

Default Re: bind parameter in existsnode function - 05-19-2008 , 11:39 AM



Oops! I got caught up in describing what I was trying to do that I
completely forgot to post the problematic result. When I try to
execute the query above, with the bind value specified above, I get
the following error...

---
An error was encountered performing the requested operation:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00601: Invalid token in: ''//Key[@Value=''True''] and //
Key[@Name=''Validation Status'']''
---

I have also tried removing the surrounding single quotes from the bind
value

---
An error was encountered performing the requested operation:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00601: Invalid token in: '//Key[@Value=''True''] and //
Key[@Name=''Validation Status'']'
---

Installed -- Oracle Data Access Components 10.2.0.2.21
Tool -- Oracle SQL Developer 1.0.0.15

Reply With Quote
  #8  
Old   
ajmastrean
 
Posts: n/a

Default Re: bind parameter in existsnode function - 05-19-2008 , 11:39 AM



Oops! I got caught up in describing what I was trying to do that I
completely forgot to post the problematic result. When I try to
execute the query above, with the bind value specified above, I get
the following error...

---
An error was encountered performing the requested operation:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00601: Invalid token in: ''//Key[@Value=''True''] and //
Key[@Name=''Validation Status'']''
---

I have also tried removing the surrounding single quotes from the bind
value

---
An error was encountered performing the requested operation:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00601: Invalid token in: '//Key[@Value=''True''] and //
Key[@Name=''Validation Status'']'
---

Installed -- Oracle Data Access Components 10.2.0.2.21
Tool -- Oracle SQL Developer 1.0.0.15

Reply With Quote
  #9  
Old   
ajmastrean
 
Posts: n/a

Default Re: bind parameter in existsnode function - 05-19-2008 , 11:39 AM



Oops! I got caught up in describing what I was trying to do that I
completely forgot to post the problematic result. When I try to
execute the query above, with the bind value specified above, I get
the following error...

---
An error was encountered performing the requested operation:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00601: Invalid token in: ''//Key[@Value=''True''] and //
Key[@Name=''Validation Status'']''
---

I have also tried removing the surrounding single quotes from the bind
value

---
An error was encountered performing the requested operation:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00601: Invalid token in: '//Key[@Value=''True''] and //
Key[@Name=''Validation Status'']'
---

Installed -- Oracle Data Access Components 10.2.0.2.21
Tool -- Oracle SQL Developer 1.0.0.15

Reply With Quote
  #10  
Old   
ajmastrean
 
Posts: n/a

Default Re: bind parameter in existsnode function - 06-17-2008 , 10:35 AM



Got it... the two single quotes around the values in the @Value and
@Name statements are escape characters too. This value

//Key[@Value='True'] and //Key[@Name='Validation Status']

may be bound to a parameter just fine.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.