Saving all output to "!!{outputDirectory}!!/udf_xpath_double.q.raw". Enter "record" with no arguments to stop it.
>>> !run !!{qFileDirectory}!!/udf_xpath_double.q
>>> DESCRIBE FUNCTION xpath_number ;
'tab_name'
'xpath_number(xml, xpath) - Returns a double value that matches the xpath expression'
1 row selected
>>> DESCRIBE FUNCTION EXTENDED xpath_number ;
'tab_name'
'xpath_number(xml, xpath) - Returns a double value that matches the xpath expression'
'Synonyms: xpath_double'
'Example:'
' > SELECT xpath_number('12','sum(a/b)') FROM src LIMIT 1;'
' 3.0'
5 rows selected
>>>
>>> DESCRIBE FUNCTION xpath_double ;
'tab_name'
'xpath_double(xml, xpath) - Returns a double value that matches the xpath expression'
1 row selected
>>> DESCRIBE FUNCTION EXTENDED xpath_double ;
'tab_name'
'xpath_double(xml, xpath) - Returns a double value that matches the xpath expression'
'Synonyms: xpath_number'
'Example:'
' > SELECT xpath_double('12','sum(a/b)') FROM src LIMIT 1;'
' 3.0'
5 rows selected
>>>
>>> SELECT xpath_double ('this is not a number', 'a') FROM src LIMIT 1 ;
'_c0'
'NaN'
1 row selected
>>> SELECT xpath_double ('this 2 is not a number', 'a') FROM src LIMIT 1 ;
'_c0'
'NaN'
1 row selected
>>> SELECT xpath_double ('200000000040000000000', 'a/b * a/c') FROM src LIMIT 1 ;
'_c0'
'8.0E19'
1 row selected
>>> SELECT xpath_double ('try a boolean', 'a = 10') FROM src LIMIT 1 ;
'_c0'
'0.0'
1 row selected
>>> SELECT xpath_double ('1248', 'a/b') FROM src LIMIT 1 ;
'_c0'
'1.0'
1 row selected
>>> SELECT xpath_double ('1248', 'sum(a/*)') FROM src LIMIT 1 ;
'_c0'
'15.0'
1 row selected
>>> SELECT xpath_double ('1248', 'sum(a/b)') FROM src LIMIT 1 ;
'_c0'
'7.0'
1 row selected
>>> SELECT xpath_double ('1248', 'sum(a/b[@class="odd"])') FROM src LIMIT 1 ;
'_c0'
'5.0'
1 row selected
>>> !record