dimanche 24 mai 2015

Oracle sql select query where primary key is random

I have an oracle table which is being filled with voice call detail records. I would like to select the data from this table and transfer it to another database every 20 mins. The id for the call record is created whenthe call is started but the calls are only added to the cdr record table upon completion of the call, which results in the rows in the table being random entered. I would like to use a query which selected all the data that is newer than the last extracted row from the previous query result.

For example based on the table bellow if the previous query extracted the. Rows upto id 24 the new query would extracted rows 54 , 6 and 53

Id. CLI. CLD 7. 1000. 2000 2. 1021. 2031 24. 1032. 2035 54. 1045. 2053 6. 1065. 2035 53. 1000. 2032

Thanks

John




Aucun commentaire:

Enregistrer un commentaire