I have a table in sql server and I need to reset my field into 1.
sql table1:
I need it to be like,
I used this code,
How can I do this?
Thank YOU
sql table1:
Code:
nParaID cParaNo cParaYear cParaCD
120 10 2021 XYZ
I need it to be like,
Code:
nParaID cParaNo cParaYear cParaCD
120 [b] 1[/b] 2022 XYZ
I used this code,
Code:
stra="select cFtyCD, cInvNo,dXFactory from MIS.dbo.vInvFinalAll WHERE cInvNo=?thisform.txtInvoiceNo.VALUE"
SQLEXEC(hndOps,stra,'_XFactory')
stra="select nParaID,cParaYear,cParaNo from MIS.dbo.wshPara WHERE cParaCD=?thisform.cboFactory.value+'C'"
SQLEXEC(hndOps,stra,'_ParaYear')
SELECT _ParaYear
SELECT _XFactory
IF VAL(cParaYear) = YEAR(TTOD(dXFactory))
SELECT dXFactory FROM _XFactory INTO CURSOR N_Year
ELSE
**here I need to reset my cParaNo into 1****
_cParaYear=ALLTRIM(STR(dXFactory))
stra="update MIS.dbo.wshPara set cParaYear=?_cParaYear where cParaCD=?thisform.cboFactory.value+'C'"
SQLEXEC(hndOps,stra)
ENDIF
How can I do this?
Thank YOU