sync state
This commit is contained in:
20
OCTPDBA-662 - Export LORE in CSV format for AI/query.sql
Normal file
20
OCTPDBA-662 - Export LORE in CSV format for AI/query.sql
Normal file
@@ -0,0 +1,20 @@
|
||||
USE Arizona;
|
||||
GO
|
||||
|
||||
SELECT CONVERT(DATE, [LCL_value_date]),
|
||||
[ITK_key],
|
||||
[ittx].[ITTX_description],
|
||||
[LCL_calculation]
|
||||
FROM [Arizona].[dbo].[LORE_calculation_log] WITH (NOLOCK)
|
||||
JOIN [dbo].[Item_key] WITH (NOLOCK)
|
||||
ON ITK_item = LCL_item
|
||||
AND ITK_type = 1
|
||||
JOIN [dbo].[Item] IT WITH (NOLOCK)
|
||||
ON [IT].[Item_ID] = ITK_item
|
||||
AND [IT].[IT_origin] = 1
|
||||
JOIN [dbo].[Item_text] ittx WITH (NOLOCK)
|
||||
ON [ittx].[ITTX_item] = ITK_item
|
||||
AND [ittx].[ITTX_language] = 103
|
||||
WHERE [LCL_value_date] >= DATEADD(yy, -2, GETDATE())
|
||||
ORDER BY CONVERT(DATE, [LCL_value_date]) DESC,
|
||||
[ITK_key];
|
||||
Reference in New Issue
Block a user