This discussion is archived
2 Replies Latest reply: May 8, 2013 8:41 PM by 894936 RSS

rowtype

894936 Newbie
Currently Being Moderated
I am trying to select the xml statement i am getting the below error.
ORA-06550: line 2, column 16:
PLS-00310: with %ROWTYPE attribute, 'TEST_TEMP.BU_CODE' must name a table, cursor or cursor-variable
ORA-06550: line 2, column 16:
PL/SQL: Item ignored
declare
l_bu_code test_temp.bu_code%rowtype;
l_result clob;
begin
select xmlelement("tendermanagement",
xmlattributes(
'http://www.ikea.com/sarec/declaredfunds' as "xmlns"
, 'http://www.w3.org/2001/XMLSchema-instance' as "xmlns:xsi"
, 'http://www.prod.com/S_Dest/declaredfunds declaredFunds.xsd' as "xsi:schemaLocation"
, bu_type as "buType"
, bu_code as "buCode"
, 'RIMS' as "sourceSystem"
)
, xmlagg(
xmlelement("tendermovement",
xmlattributes(to_char(to_date(sales_date), 'YYYY-MM-DD"T"HH24:MI:SS"Z"') AS "date"
,'DROP' as "bookingType"
, 'B2B Invoice' as "tenderType"
, 'STORE' as "salesAreaGroup"
,invoice_total as "valueTendered"
, till_no as "tillNo"
, receipt_no as "transactionNo"
)
)
)
).extract('/*').getclobval() as cutomer_info
into l_result
FROM test_temp
WHERE ROWNUM <20
group by bu_code,bu_type;
dbms_output.put_line(l_result);
end;
  • 1. Re: rowtype
    Jason_(A_Non) Expert
    Currently Being Moderated
    #1: This question has nothing to do with the XML DB and is a {forum:id=75} forum type question.

    #2: You've seen the answer already in {message:id=11004918}. You used [url http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/rowtype_attribute.htm#LNPLS01342]%ROWTYPE when you really needed to use [url http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/type_attribute.htm#i36397]%TYPE. There is a difference. Follow those links to read about what those differences are.
  • 2. Re: rowtype
    894936 Newbie
    Currently Being Moderated
    Thanks,

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points