Hi,
I want to insert data that are present in one table viz:FAS to another table viz:FAS_Quarter for every 3 months once automatically using the scheduler,by retaining the data that was inserted for previous quarter also in the FAS_Quarter table.I want stored procedure to do this work using the scheduler.
Can anybody help me how to achieve this using scheduler by using stored procedure
Thanks and Regards
Spoorthi G S
What I have tried:
I am able to insert data from FAS to FAS_Quarter normally but not with scheduler ,how can i do this
The snippet of code that i have tried out:
insert into FAS_Quarter (CompanyCode,Year,Month,AssetNumber,SESAID,ProcessingYearMonth,CreateId,CreateDate,UpdateId,UpdateDate)
select f.CompanyCode,f.Year,f.Month,f.AssetNumber,f.SESAID,CASE
WHEN MONTH(YEAR) BETWEEN 1 AND 3 THEN convert(char(4), YEAR(YEAR) - 1) + '03'
WHEN MONTH(YEAR) BETWEEN 4 AND 6 THEN convert(char(4), YEAR(YEAR) - 1) + '06'
WHEN MONTH(YEAR) BETWEEN 7 AND 9 THEN convert(char(4), YEAR(YEAR) - 0) + '09'
WHEN MONTH(YEAR) BETWEEN 10 AND 12 THEN convert(char(4), YEAR(YEAR) - 0) + '12'
END AS ProcessingYearMonth,f.CreateId,f.CreateDate,f.UpdateId,f.UpdateDate from FAS f
Please help me by using scheduler .