We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 85a8952 commit 45e2520Copy full SHA for 45e2520
1 file changed
ehr/resources/queries/auditLog/DemographicsDeleted.sql
@@ -1,9 +1,10 @@
1
WITH cte0 AS (
2
SELECT
3
a.Date,
4
- substring(a.DataChanges, a.IdStart, CAST(LOCATE('&', a.DataChanges, LOCATE('&Id=', a.DataChanges) + 1) - a.IdStart AS INTEGER)) as Id
+ substring(a.DataChanges, a.IdStart, CAST(LOCATE('&', a.DataChanges, LOCATE('&Id=', a.DataChanges) + 1) - a.IdStart AS INTEGER)
5
+ ) as Id
6
FROM (
- SELECT Date,
7
+ SELECT Created AS Date,
8
DataChanges,
9
LOCATE('&Id=', DataChanges) + LENGTH('&Id=') as IdStart
10
FROM DatasetAuditEvent
0 commit comments