You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the information be displayed in proper way, the datasets need to run in order, first the update then the restore and at last the Select.
As reporto builder doesn't have this functionality, I put the tree queries in one and in order
--FIRST RUNS THE UPDATE
UPDATE [dbo].[H_Targets]
SET [Target] = (CASE WHEN [Target] = 0 THEN 1 ELSE [Target] * @TGT_VAR END)
WHERE KPI = @kpi
AND @action = 'Update'
--SECONDS THE RESTORE
UPDATE [dbo].[H_Targets]
SET [Target] = [Target_Original_Values]
WHERE KPI = @kpi
AND @action = 'Restore'
--THEN THE SELECT STATEMENT
SELECT [KPI]
,[Target]
,[Target_Original_Values]
,[Grade]
FROM [dbo].[H_Targets]
The text was updated successfully, but these errors were encountered:
For the information be displayed in proper way, the datasets need to run in order, first the update then the restore and at last the Select.
As reporto builder doesn't have this functionality, I put the tree queries in one and in order
--FIRST RUNS THE UPDATE
UPDATE [dbo].[H_Targets]
SET [Target] = (CASE WHEN [Target] = 0 THEN 1 ELSE [Target] * @TGT_VAR END)
WHERE KPI = @kpi
AND @action = 'Update'
--SECONDS THE RESTORE
UPDATE [dbo].[H_Targets]
SET [Target] = [Target_Original_Values]
WHERE KPI = @kpi
AND @action = 'Restore'
--THEN THE SELECT STATEMENT
SELECT [KPI]
,[Target]
,[Target_Original_Values]
,[Grade]
FROM [dbo].[H_Targets]
The text was updated successfully, but these errors were encountered: