Forum Discussion

nisse_miller's avatar
12 years ago

Database Checkpoint


We have setup a simple oracle db with one table containing 4 different fields. We want to execute a test where we setup a Database Checkpoint towards this table. In the table we have 5 different elements with the same content in the comment-field of each element. We want to perform a check on that table where we check if the comment-field contains something similar to a string and we want to see if that is greater than, less than and equal to a any value.


 


The first part is solved by the SQL-command below:


 



SELECT COUNT(*) AS X


FROM


  AKT_KONTAKTPERSONER


WHERE KOMMENTAR LIKE '%<string-to-look-for%'



 


But we want the checkpoint to be successfull, or failing, if the number of hits are below or greater than any integer. How do we do that through the GUI? Like it is possible to do with property checkpoints.


 

  • sastowe's avatar
    sastowe
    Super Contributor
    You are going to maybe get  answers from folks like Tanya who knows TC like the back of her hand. For me, I'd do it in code using ADO (aka Active Data Objects) and Log.Checkpoint or Log.Error in code conditionals.



    You have the query...

  • Hi Nils-Erik,


     


    If you compared the whole table in the DB, you would use the database checkpoint. However, your task is a bit different. In this case, I agree with Stephanie - it would be easier for you to create the SQL expression matching your needs and to execute it via ADO.