0
您好我有和XML文件調用的test.xml具有以下內容編寫XML文件的字符串,然後插入到Oracle數據庫常規
<?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>
我需要的內容加載到名爲SCOTT.RESP Oracle表使用Groovy
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:列在這裏不允許
不要ü知道爲什麼我得到這個錯誤?
的問候,並提前