Thanks Madam
Regards
>>Hi,
>>
>>I have a cursor with three columns. Detail, POSC, POSR
>>I am Deleting records from it like This
>>
>>
>>Delete From ABC Where ;
>> posC=0 Or ;
>> posR=0 Or ;
>> posR>posRTOPMOSTVALUE Or ;
>> GETWORDNUM(POS,Getwordcount(Alltrim(POS))-3)='(Page'
>>
>>
>>
>>I want to Delete Based on above critera, however I Do not want to Delete one record having Detal="ENDP" although it is having corresponding value of posR=0 or posC=0
>>
>>i.e I want to delete all posc, posr etc based on above but not the record having DETAIL="ENDP"
>>
>>What additional condition I need to Add on the above
>>
>>Regards
>>
>>
>>
>>
>>
>>
>>Using the above SQL for Delete
>
>
Delete From ABC Where ;
> (posC=0 Or ;
> posR=0 Or ;
> posR>posRTOPMOSTVALUE Or ;
> GETWORDNUM(POS,Getwordcount(Alltrim(POS))-3)='(Page') AND NOT Detail = 'ENDP'
Harsh