cancel
Showing results for 
Search instead for 
Did you mean: 

Update query in JDBC adapter

Former Member
0 Kudos

Hi guys help me with this

1) What is the use of update query in jdbc adapter?

2) Why do we use the flag field in jdbc table ?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

1) What is the use of update query in jdbc adapter?

The purpose of the Update Query in JDBC is to change the status of the processed records in the table.

That is when JDBC query is executed it select the records from the table in the Database and it sends to the Receiver.

After that it executes the Update query to change the status of the processed records in the Table.

2) Why do we use the flag field in jdbc table ?

Flag field in the table is used to identify which record is processed by Jdbc adapter. Initial stage it will have the status as 0 , if it is successfully processed then it will updated to 1.

Based on this we can identify processed records which is done by update query.

Regards

Sridhar Goli

Former Member
0 Kudos

Thanks a lot Gaurav and Sridhar.

Can you please tell me this. Where do we find the flag field in jdbc adapter ? Does it comes under processing parameters ? and also can we see its value or do we have to set it by ourselves ?

Thanks to both

Former Member
0 Kudos

Hi Midhun

I dont think flag is some configuration parameter at JDBC adapter. You need to have Flag in the database you are working on that you can set to some value using the JDBC adapter while querying the system.

Thanks

Gaurav

Former Member
0 Kudos

Hi Midhun,

The flag field is not configured in the JDBC adapter. It is created as a one column in the Database Table. We can update the flag column by using the Update query.

Regards

Sridhar Goli

Former Member
0 Kudos

Thanks Sridhar, that solves my query. If you have time can you tell this as well. How do we check the updated value in database. We need to open the database, neednt we ?

Former Member
0 Kudos

When you check the message monitoring throgh runtime work, if it is processed successfully it will update the tables automatically.

You can check the tables also to find the which records are processed by the JDBC adapter.

Regards

Sridhar Goli

Former Member
0 Kudos

Thanks Sridhar

Regards

Midhun Madhav

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

Update query can update fields in table based on some condition. For updating any column it will be selecting those columns and updating fields based on condition.

EX - UPDATE table SET field1 = value1 WHERE field2 = value2

We use flag fields in tables to identify a particular case and for that you dont need to compare entire row.

example. to identify a record (row in table) is latest or not you have a flag called ACTIVE. Now if the value is Y for ACTIVE that means the record is latest and value N means record is not latest. For this you have not done compare operations like data < or > or =

Thanks

Gaurav