>Hi Experts,
>
>I have an sql Query statement, i want retrive data based on condition like
>
>cCod = '1'
>cBranch = 'Brn1'
>
>IF Thisform.Check1.Value = 1
> cCondition = 'ItmMast.ItemCod = cCod'
>Else
> cCondition = 'ItmMast.ItemBrn = cBranch'
>Endif
>
>'Select ItmCod, ItmDes From ItmMast Where cCondition'
>
>How i will i convert this to an Sql Server statement.
lcSQL = 'Select ItmCod, ItmDes From ItmMast Where' + cCondition
SQLExec( ...., lcSQL )