Skip to content

Commit

Permalink
#93 | Adding some entries to usefulQueries.sql
Browse files Browse the repository at this point in the history
  • Loading branch information
himeshr committed Oct 10, 2023
1 parent 8b93e98 commit 8d8cf32
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions goonj/src/main/resources/database/usefulQueries.sql
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,21 @@ where et.follow_up_step <> '1'
group by 2,3,4
;

-- Find all error record logs for an integration
select
count(*)
from error_record er
join error_record_log erl on er.id = erl.error_record_id
join error_type et on erl.error_type_id = et.id
where
er.integration_system_id = 2
;

-- Delete all error record logs for an integration
delete from error_record er
where er.integration_system_id = 2;

-- Delete all error records for an integration
delete from error_record_log erl
using error_record er
where er.id = erl.error_record_id and er.integration_system_id = 2;

0 comments on commit 8d8cf32

Please sign in to comment.