在teradat中获取语法错误。这个查询有什么问题?

时间:2017-02-13 11:34:57

标签: teradata

SELECT sysxml.XPathValue(O.CAST(xmlOrder VARCHAR(1000) CHARACTER SET UNICODE), '//ORDER/PO_NUMBER/*') AS PO_Number,
       sysxml.XPathValue(O.CAST(xmlOrder VARCHAR(1000) CHARACTER SET UNICODE), '//ORDER/DATE/*') AS theDate
FROM   COMMON.OrderLog O
WHERE  sysxml.XPathValue(O.CAST(xmlOrder VARCHAR(1000) CHARACTER SET UNICODE), '//ORDER/BILLTO/*') = 'Mike';

1 个答案:

答案 0 :(得分:1)

CAST不属于OxmlOrder可能属于。{。} 所以不要这样:

O.CAST(xmlOrder ...

您可能需要在所有三行中执行此操作:

CAST(O.xmlOrder ...