
Hi Experts, I want a complete end to end code for the below requirement. I would like to explain you the below requirement into 3 steps. cases. I request you to please provide me the code to FULFIL my requirement....
1) Fetch all the records from a SQL VIEW (not from original table) based on the query "SELECT * from AMAR_VIEW WHERE CLASS = 'TENTH" & SIGN = 'AAA' " List of fields below fields as example: - Fields are; - TIMESTAMP,ROLLNO,FROMID,SIGN,CLASS
2) Once you Select lets say 10 records from table / view then you need to Update the selected records only based on the UNIQUR KEY FIELD --> ROLL_NO and what ever the you selected rows those only needs to be update the Signature field SIGN from 'AAA' to 'BBB'
3) Once you Update there immediately then you need to push and output XML file with all records into a single XML with containing as Row's.
Please see the output XML: - I need output XML File as: -
**
<?xml version="1.0" encoding="utf-8"?>
<ns:MT_TestingSQL xmlns:ns="http://abcd.com//SQL_to_File">
<row>
<TIMESTAMP>20101107094853</TIMESTAMP>
<ROLL_NO>112</ROLL_NO> // UNIQUE KEY FIELD
<FROM_ID>SQL01</FROM_ID>
<SIGN>AAA</SIGN> // FLAG = Intially it will comes as W21 once you select 10 records lets say ex: - then you need to UPDATE Only those Selected fields only with status field SIGN = 'AAA'
<CLASS>TENTH</CLASS>
</row>
**
Kindly provide me the JAVA CODE for generating the output XML file.
Regards Amar Srinivas Eli

I prefer to go for SAX Parser while creating the XML file after fetching the records.
Also please try to use Isolation level as "SERIALIZABLE" Concept while implementing the code it means stating that it will lock the view while accessing the database so that new records will not get insert into the same time while my code is accessing.
Also please update the records in a control way based on ROLL_NO
Thanks in Advance

I prefer to go for SAX Parser while creating the XML file after fetching the records.
Also please try to use Isolation level as "SERIALIZABLE" Concept while implementing the code it means stating that it will lock the view while accessing the database so that new records will not get insert into the same time while my code is accessing.
Also please update the records in a control way based on ROLL_NO
Thanks in Advance
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.