cancel
Showing results for 
Search instead for 
Did you mean: 

Sender JDBC Dynamic parameter value in select query

vijay_kumar133
Active Participant
0 Kudos

Hi All,

I have a scnario where i have read only acess to a table and We cannot use stored procedures..

Interface is JDBC to file.

Now there is one filed in the table which holdes the system date and time.Ex filed name as Sysdate.

now can i use query as select * from table1 where Sysdate = x+1.

where X is the last process Sysdate field value.. is there any work arround to store the value in a file and check dynamically every time from that file to get the value of x and after that X+1 value has to be updated back to that file..

main aim is to eliminate duplicate entries.

Regards

Vijay

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member187339
Active Contributor
0 Kudos

Hi Vijay,

>>main aim is to eliminate duplicate entries.

Instead of Date/Time, use some flag fields. Update the flag for of the read records and while selecting look out for these flag values.

Regards

Suraj

vijay_kumar133
Active Participant
0 Kudos

Hi suraj,

thanks for the reply i have proposed the same for the requirement but there is no acess to update the table all we have is to read only the table.. so i get out one other way round to ensure the proper data has to be flow..

Similarly there is one more where i have datetime field value i need to break all entires on base of time and pick the values ...

Even i proposed if you thre is no authorization to update the flag give me in flat file so that i can split the file by uisng java mapping..

But its was badluck i have a table with few lak entries read only aces to the table and ensure data has to be properly flow with out any duplications and miss entries.. any approach that we can achive this..

Regards

Vijay

Edited by: vijay Kumar on Apr 12, 2010 1:36 PM

former_member187339
Active Contributor
0 Kudos

Hi Vijay,

What database are you using?

Try to find some time/date functions which can return you the system time and do a query based for records for an interval of <current system time> to <current system time - 10)

and keep your polling interval to 10min

give a try.

Regards

Suraj

vijay_kumar133
Active Participant
0 Kudos

Hi Suraj,

Hope this may help let me check..

But only problem with this approach is when the sap-pi server is undermaintaince or legacy sytem .. entire cycle will get intrupted.. at this situations how can i track till which record last time i have fetched. and now how to start the process again with out any failure of data..

Database is oracle.

even its not relavent question here can we use SAP DI in this scnario if i need to send data to BI for similar case.

as the same data i need to pass to a file and one more interface to a BI.

Regards

Vijay

former_member187339
Active Contributor
0 Kudos

Hi Vijay,

That could be a problem.

But you can handle that in DB Stored Procedure try to convince client for that

Regards

Suraj

vijay_kumar133
Active Participant
0 Kudos

Hi suraj,

If i convince the client for update flag, then i can use select * from table top 10000 in oracle.

and while update it need to update only records which i have selected for this in adavance CC parameters has to be set rite..

If so what are the prameters as to be set for exmaple in a tble if it contains some laks of records i need to pick the records in batch wise and while update it has to update only the records which i have picked in first batch.

Regards

Vijay

Edited by: vijay Kumar on Apr 21, 2010 7:24 AM