If-Then-Else not working right in QTP
♥ 0 |
Case description: If testargs("LocDate") = "sysdate" Then msgbox "LocDate = sysdate" Set MyRecordSet14= DBO.Execute(" Update locdate set locdt = (SELECT TO_CHAR(SYSDATE) FROM dual) where locnbr = " & aa_Variable.Item("LocNbr") & "and locdtcd = ‘PRO"’) DBO.Execute ("Delete from DaySumm where businessdt > (SELECT TO_CHAR(SYSDATE) FROM dual) and locnbr=" & aa_Variable.Item("LocNbr") & "") DBO.Execute ("Delete from History where businessdt > (SELECT TO_CHAR(SYSDATE) FROM dual) and locnbr=" & aa_Variable.Item("LocNbr") & "") Set MyRecordSet16= DBO.Execute("Update daysumm set busdt = (SELECT TO_CHAR(SYSDATE) FROM dual) where busdt=(select max(busdt) from daysumm where locnbr=" &aa_Variable.Item("LocNbr") & " )and locnbr=" & aa_Variable.Item("LocNbr") & "") Else msgbox "LocDate Not= sysdate" BOTH msgboxes are being displayed???
Marked as spam
|