oracle - 运行通过 SQL Developer 将 xml 作为输入的过程时出现“必须声明过程”错误
问题描述
我有一个以 XML(数据类型 CLOB)作为输入的存储过程。当我通过 Mule 应用程序执行 SP 时,它运行良好。但是,我想通过将 XML 文件作为输入直接通过 SQL Developer 测试 SP。当我运行 SP 时,它显示“ORA-06550:和 PLS-00201:必须声明 SP”。我正在寻找有关如何通过 SQL 开发人员直接测试 SP 而不会出现此错误的建议和建议。
我尝试通过 CTRL+F10 窗口和 Execute 命令执行 SP。我也尝试在单行和多行中提供 XML 输入。
当我通过 SQL Developer 运行时,它会在发生错误时尝试执行以下语句(下面的错误截图)
DECLARE
VOUCHERXML CLOB;
BEGIN
VOUCHERXML := '<?xml version="1.0" encoding="UTF-8"?> <Voucher type="SGLP" sourceSystem="WRS" origin="WRS|CAN" refID="" paymentID="wmict:31228"> <TransferredFrom/> <TransferredTo/> <PolicyLOBSource/> <InvoiceNumber/> <InvoiceDate>2013-10-14</InvoiceDate> <AccountingDate>2013-10-14</AccountingDate> <PayDate>2013-10-14</PayDate> <Currency>CAD</Currency> <InvoiceAmount>50.00</InvoiceAmount> <Vendor sourceSystemID="" targetSystemID="CLAIMS||CAN|CAD|English"/> <Payment> <PayTo sourceSystemID=""> <Payees> <Payee>QAG - PMS Ontario Broker 4</Payee> <Payee/> <Payee/> <Payee/> <Payee/> </Payees> <AddressLine1 print="false">Unit 333 ABC steet</AddressLine1> <AddressLine2 print="false">Toronto, ON</AddressLine2> <City print="false">Toronto</City> <State print="false">On</State> <ZipCode print="false">M4C 1P5</ZipCode> <Country print="false">CAN</Country> </PayTo> <MailTo> <AddressLine1>QAG - PMS Ontario Broker 4</AddressLine1> <AddressLine2>Unit 333 ABC steet</AddressLine2> <AddressLine3>Toronto, ON</AddressLine3> <AddressLine4/> <AddressLine5/> <City>Toronto</City> <State>ON</State> <ZipCode>M4C 1P5</ZipCode> <Country>CA</Country> </MailTo> </Payment> <PaymentDetails> <BankName>CLAIMS|VENDOR|CAN|CAD|English</BankName> <AccountNumber>CLAIMS|VENDOR|REGULAR|CAN|CAD|English</AccountNumber> </PaymentDetails> <Memo1/> <Memo2/> <Memo3/> <Memo4>PAIEMENT PLANIFIǯSCHEDULED PAYMENT: FROM OCT 14 2013 TO OCT 27 2013</Memo4> <InsuredName>DANIELLE CLAIMS</InsuredName> <PolicyNumber>7025925</PolicyNumber> <ClaimNumber>007110000001300</ClaimNumber> <VoucherLines> <VoucherLine> <Description/> <Amount>50.00</Amount> <Instructions>Claim 007110000001300</Instructions> <CheckNumber/> <Distributions> <Distribution> <DistributionPolicyLOBCode/> <ProductLookupKey/> <DepartmentLookupKey>07|67|||1</DepartmentLookupKey> <Amount statistical="false">50.00</Amount> <AccountNumber>loss|unspecified</AccountNumber> <BusinessUnit>100</BusinessUnit> <BusinessSegment/> <Description/> <DepartmentCode>07|67|||1</DepartmentCode> <ProductCode/> <RiskLocation>67</RiskLocation> <AccidentYear>2013</AccidentYear> <Reinsurance/> <BusinessSegmentAffiliate/> <TransactionType/> <TypeBureau/> <CoverageGroup>ANC_614</CoverageGroup> <PolicySearchResult> <AltaGridInd/> <TypeOfBusiness/> <VehicleType/> <TypeOfUse/> <TypeBureau/> <Form/> <FacilityIndicator/> <PolicyType/> <ExpansionCd/> <SubClass/> </PolicySearchResult> <PolicySearchInput> <LOB>ANC</LOB> <LossDate>2013-08-21</LossDate> <BranchNumber>07</BranchNumber> <PolicyNumber>7025925</PolicyNumber> <PolicyModule/> <MajorPerilSequence/> <MajorPeril>614</MajorPeril> <UnitNumber>1</UnitNumber> </PolicySearchInput> </Distribution> </Distributions> </VoucherLine> </VoucherLines> </Voucher>';
IMPORT_VOUCHER_TO_PEOPLESOFT_TEST(
VOUCHERXML => VOUCHERXML
);
--rollback;
END;
我希望在执行 SP 时加载一些表。
下面是错误截图:
解决方案
推荐阅读
- django - django rest框架递归模型端点结构
- python-3.x - 这是否可以在服务器上调试和编辑实时 python 代码。如果是,那么我们该怎么做?
- django - Django Postgres JSONB 并使用 JSONB 索引
- google-sheets - 在一页数据洞察中过滤单个表
- windows - procdump 转储是否显示由于需求分页而从未加载的页面?
- html - 从 Boostrap 3 迁移的 Bootstrap 4 网格布局问题
- asp.net-core-3.1 - 使用依赖注入从 serilog .Net Core Web API 读取 InMemory 日志
- android - 无法在锁屏或应用程序处于后台时显示闹钟播放 ui
- sql - 在 Laravel 中使用 Eloquent 在模型中应用语句
- pandas - 平均熊猫数据框:重新采样,插值?