sql server and asp if statement
is there any way to use an if statement in a SQL Server.
I have written a code in an asp. I want to check the code
in SQL.
strUpdate = "update tblCustRate set dtRateFrom =" & ndateFrom & _
", dtRateTo =" & ndateUntil& _
", decHourlyRate=" & nHourlyRate
'" where iEmpID=" &iEmpID&_
'" and iTaskID= " & iTaskID &_
'" and iProjDetID=" & iProjDetID
if resType ="E" then
strUpdate= strUpdate & " where iEmpID= " & iEmpID &_
" and iTaskID= " & iTaskID &_
" and iProjDetID=" & iProjDetID
else
strUpdate=strUpdate & " where iSubcontID = " & iSubcontID &_
" and iTaskID= " & iTaskID &_
" and iProjDetID= " & iProjDetID
end if
|