Class TExpressionCallTarget

Object
gudusoft.gsqlparser.nodes.TParseTreeNode
gudusoft.gsqlparser.nodes.TExpressionCallTarget
All Implemented Interfaces:
Visitable, Iterator<TSourceToken>

SQL Server value() Method performs an XQuery against the XML and returns a value of SQL type.

You typically use this method to extract a value from an XML instance stored in an xml type column, parameter, or variable.

This class represents an xml type column, parameter, variable or subquery.
     DECLARE @myDoc xml
      DECLARE @ProdID int
      SET @myDoc = '<Root>
     <ProductDescription ProductID="1" ProductName="Road Bike">
     <Features>
     <Warranty>1 year parts and labor</Warranty>
     <Maintenance>3 year parts and labor extended maintenance is available</Maintenance>
     </Features>
     </ProductDescription>
     </Root>'
     SET @ProdID =  @myDoc.value('(/Root/ProductDescription/@ProductID)[1]', 'int' )
     SELECT @ProdID
 
In the above SQL, this class represents <code > @myDoc</code> before the value() function.