Need Sql query that moving the data from last year to current year
I have 2 tables
select * from snsystemcertification
select * from SNLunchSevereNeeds
I have to write a stored procedure from these tables I have to get systemcertification id
FROM SNSystemCertification AS SFA
INNER JOIN SNLunchSevereNeeds AS LS ON SFA.SystemCertificationID = LS.SystemCertificationID
and LS.HHFKOverride = 1
and LS.HHFKProcess = 1
and LS.HHFKPayFrom = 7
This table is the eligible table SNLunchSevereNeeds (the idea is that what ever last year eligible this year also should be eligible)
need to find out like for all the systems who are eligible for current year!!
can anyone help like how to write a stored procedure.