您好,我的xml文件名为test.xml,内容如下:
<?xml version="1.0" encoding="UTF-8" ?>
<ns:AccountQueryPage_Output xmlns:ns="urn:crmondemand/ws/ecbs/account/">
<ListOfAccount xmlns="urn:/crmondemand/xml/Account/Data" lastpage="true">
<Account>
<Id>CCC-TEST01</Id>
<AccountName>John Smith Pty Ltd</AccountName>
</Account>
</ListOfAccount>
</ns:AccountQueryPage_Output>
我需要使用groovy
将内容加载到名为SCOTT.RESP的oracle表中import groovy.sql.Sql
String fileContents = new File('C:\\Documents\\test.xml').getText('UTF-8')
println fileContents
sql = Sql.newInstance("jdbc:oracle:thin:@localhpst:1521/orcl.com", "SCOTT", "Password","oracle.jdbc.pool.OracleDataSource")
sql.execute("""INSERT INTO SCOTT.RESP VALUES(fileContents)""")
我收到错误
ORA-00984:此处不允许列
(从错误行号中减去17以考虑标准导入) java.sql.SQLSyntaxErrorException:ORA-00984:此处不允许列
你知道我为什么会收到这个错误吗?
提前致意并表示感谢