Hello to all,
I'm trying to generate an XML output but I have some problems with that. When I execute the process I have this result:
<Invoice>
<InvoiceNo>000000041844 8/9903</InvoiceNo>
<InvoiceStatus>N</InvoiceStatus>
<CustomerID>Consumidor final</CustomerID>
</ShipFrom>
<Line>
<LineNumber>2</LineNumber>
<LineNumber>4</LineNumber>
<ProductCode>CATG</ProductCode>
<Quantity>1</Quantity>
<UnitOfMeasure>UNIT</UnitOfMeasure>
<UnitPrice>137</UnitPrice>
<TaxPointDate>2010-02-04</TaxPointDate>
<Description>CATERING O/G</Description>
<CreditAmount>136.5</CreditAmount>
</Line>
</Invoice>
I have two lineNumber in the same Line (element), but I only want one... this is happens because the others values are the same.
But when I made change like partitionating by ordered I carrect the previews issues but now I have this issue:
ERROR: Element '{urn:OECD:StandardAuditFile-Tax:PT_1.01_01}Invoice': Duplicate key-sequence ['000000041844 8/9903'] in unique identity-constraint '{urn:OECD:StandardAuditFile-Tax:PT_1.01_01}InvoiceNoConstraint'.
and this result:
<Invoice>
<InvoiceNo>000000041844 8/9903</InvoiceNo>
<InvoiceStatus>N</InvoiceStatus>
<CustomerID>Consumidor final</CustomerID>
</ShipFrom>
<Line>
<LineNumber>2</LineNumber>
<ProductCode>CATG</ProductCode>
<Quantity>1</Quantity>
<UnitOfMeasure>UNIT</UnitOfMeasure>
<UnitPrice>137</UnitPrice>
<TaxPointDate>2010-02-04</TaxPointDate>
<Description>CATERING O/G</Description>
<CreditAmount>136.5</CreditAmount>
</Line>
</Invoice>
<Invoice>
<InvoiceNo>000000041844 8/9903</InvoiceNo>
<InvoiceStatus>N</InvoiceStatus>
<Line>
<LineNumber>6</LineNumber>
<ProductCode>PARK</ProductCode>
<Quantity>1</Quantity>
<UnitOfMeasure>UNIT</UnitOfMeasure>
<UnitPrice>16</UnitPrice>
<TaxPointDate>2010-02-04</TaxPointDate>
<Description>PARKINGCHARGE</Description>
<CreditAmount>15.73</CreditAmount>
</Line>
</Invoice>
I have two invoices with the same number, but I only want one.
Anyone can Help on this?
Thank you,
Elisabete
XML output duplicate constraint
Moderators: chulett, rschirm, roy
Re: XML output duplicate constraint
Mark a key column which is unique..
thanks.
thanks.