Add timezone-conversion and dashboard-widget SQL functions; remove obsolete backup__ copies
Playwright Tests / test (push) Canceled after 0s
Playwright Tests / test (push) Canceled after 0s
Add datetime_LocalToUTC / datetime_utcToLocal, and two widget query functions (fds_wdg_MFRSync, fds_wgd_lastEmails). Remove the unreferenced backup__fds__* function files superseded by their current counterparts, and suppress SQL71501 (unresolved cross-database/composite references) project-wide. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
create function [fds_wgd_lastEmails](@count int = 10)
|
||||
returns table
|
||||
as return
|
||||
|
||||
SELECT TOP (@count)
|
||||
[Betreff] = oj.[subject],
|
||||
[Empfänger] = (SELECT STRING_AGG(
|
||||
CASE WHEN CHARINDEX('<', [value]) > 0
|
||||
THEN SUBSTRING([value], CHARINDEX('<', [value]) + 1, CHARINDEX('>', [value]) - CHARINDEX('<', [value]) - 1)
|
||||
ELSE [value]
|
||||
END, ', ')
|
||||
FROM OPENJSON(JSON_QUERY(el.[config], '$.to'))),
|
||||
[attachments] = (SELECT STRING_AGG([value], ', ') FROM OPENJSON(JSON_QUERY(el.[config], '$.attachments'))),
|
||||
[gesendet] = FORMAT(el.DateSent, 'dd.MM.yy', 'de-DE')
|
||||
FROM [dbo].[fds__emaillog] as el
|
||||
CROSS APPLY OPENJSON(el.[config], '$') WITH ( [subject] nvarchar(255) '$.subject' ) as oj
|
||||
order by [DateSent] desc
|
||||
Reference in New Issue
Block a user