Good day,
How do i insert this SQL query alteryx to help me update my File_ Audit table in SQL Server after record has been moved there. It works more like a control/audit table. I have used both post and pre SQL create statement but it won't work. Please i need help
Declare @load_date_time datetime,
@Inserted_Record_Count int;
set @load_date_time = getdate();
set @Inserted_Record_Count = (select Count(*) from [dbo].[school]);
Begin
Update [dbo].[File_Audit]
set load_date_time = @load_date_time,
Inserted_Record_Count = @Inserted_Record_Count
Where Table_Name = 'School';
end;