Link to home
Start Free TrialLog in
Avatar of Judy Deo
Judy DeoFlag for United States of America

asked on

performing a query or check on a valuelist

i have the following value list which gets data from a query:

<cfset userinvoices_list = ValueList(Query1.t_current_amount)>

how do i write a query or some other statement that checks if any of the values in this list
are NOT equal to '.00' AND also if the first character of any of the values are NOT equal to '-' ?

(i put quotes around each value because they are text values not numbers)  

so a query that returns zero results would be if the valuelist contained something like:

(.00, .00, .00, .00)

but would return 2 results if the valuelist contained something like:

(2.37, .00, -2.54, .00)
      
ASKER CERTIFIED SOLUTION
Avatar of Tacobell777
Tacobell777

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Tacobell777
Tacobell777

If you do not want to include any negative numbers you first need to remove these numbers from the list, i.e.
1. you loop over the list
2. check if the value is negative
3. if negative then remove the value from the list

Let me know if you need a example for this?