Compare Value with all the fields

Hi all ,

I have an field called Difference in One table.The condition is difference should be less than 15. I have check all the values of differene field in that table.Only If no one(Difference) field is greater than 15 , I have to continue…

Tell me the possibilities.

Thanks in Advance.

Not sure what issue you have?
If you want to select the records with all Different less than 15, you write a simple select statement to achieve it
While select table
where table.Difference < 15
// do something

Thanks Kranthi,

First I have to compare 15 with all table fields.After comparing with all and if one one is greater than 15 means i have to continue…

What do you mean by continue?

I have to update one status.

if No Invoices are >15 days past due

Set CustTable.hrk_CreditStatus to ‘Approved’.

For all open Sales Orders (SalesStatus = ‘Open Order’ or ‘Journal’) for this customer where SalesTable.Payment is not ‘Prepayment’ or ‘Visa/MC’ or ‘CC Auto’, set SalesTable.hrk_CreditStatus = ‘Approved.

Remove any hold records in MCRHoldCodeTrans where the Hold Code = ‘Past Due’.

select firstonly Recid from table where table.diffrence > 15; // you can add more conditions in the where clause based on your requirement

if (!table.RecId)
// do anything

Thanks Kranthi.Its working…

Please don’t forget to verified the helpful reply/replies (using “This helped me” link).

Ok Martin.