I have table: TBL_SAMPLE
SAMPLE_ID - Primary Key
SAMPLE_CD - String
statusDateTime - DateTime
DATA_AREA - CLOB
I have this schema:
<schema>
<parameterizationId label="Samp Id" mapField="SAMPLE_ID" dataType="string"/>
<statusDateTime required="true" dataType="dateTime" default="%CurrentDateTime" mapField="STATUS_UPD_DTTM"/>
<user default="%CurrentUser" mapField="USER_ID" dataType="string"/>
<dataArea type="group" mapXML="DATA_AREA">
<accountId dataType="string"/>
<saId dataType="string"/>
<saTypeCode dataType="string"/>
<endDate dataType="date"/>
<beginBalAmt dataType="number"/>
</dataArea>
I need to populate the DATE_AREA CLOB column and should look like this: (EXPECTED)
<accountId>0854215</accountId><saId>745152</saId><saTypeCode>TES</saTypeCode><endDate>16-Dec-2019</endDate><beginBalAmt>10525</beginBalAmt>
I have this existing SQL:
INSERT INTO TBL_DIFF
SELECT
SA.ACCT_ID,SA.SA_ID,SA.SA_TYPE_CD,'31-DEC-16',0
FROM CI_SA SA
I want to populate the DATA_AREA column using this sql statement with the expected output I provided above. How to do that?