I have a data set which have nparayear as 2020.
If my nparayear is equal to this year that means 2021 there is no issue to print number as 2021. But if someone run the file in 2022 I need to get my nparayear as 2021. how can I do this? This is how I tried.
If my nparayear is equal to this year that means 2021 there is no issue to print number as 2021. But if someone run the file in 2022 I need to get my nparayear as 2021. how can I do this? This is how I tried.
Code:
stra="select nParaID, cParaNo, cParaYear, cParaCD from MIS.dbo.wshPara WHERE cParaCD=?thisform.cboFactory.value+'C'"
SQLEXEC(hndOps,stra,'_wshPara')
SELECT _wshPara
IF YEAR(date()) then
SELECT val(cParaYear) as nParaYear FROM _wshPara INTO CURSOR N_Year
year=N_Year.nParaYear
ELSE
year_new=ALLTRIM(N_Year.nParaYear)+ 1
year=year_new.nParaYear
ENDIF