Find fields containing Negative Numbers

m6n6

New member
Local time
Yesterday, 23:07
Joined
Sep 12, 2006
Messages
1
I don't know if this is doable, I need to find fields in a table that contain negative numbers with out having to search every numeric field. Can I query the whole table and get a list of Fields that have at least one negative number?
 
You are going to have to search each column somehow... sorry...
 
you could loop through the table and for each row loop through each column by referring to the column's ordinal or index number 9columns start at index 0), you do not need to know a column's. Then for each column test its type if it is a number then test if <0.
 
I don't know if this is doable, I need to find fields in a table that contain negative numbers with out having to search every numeric field. Can I query the whole table and get a list of Fields that have at least one negative number?


How many flds contain numbers you want to search.

Set up a select qry and put <0 in the Criteria cell. If you have a no of fields put <0 one cell down for each fld. This creates an OR

eg will look like: (without the -----)
<0
------<0
----------------<0

If you put <0 more than once on the same row of the Criteria grid it produces an AND ie both flds have to meet the criteria for a record.
 
or use another column as a true false

status: col1<0 or col2<0 or col3<0

and just put true as the criteria at the bottom.
 

Users who are viewing this thread

Back
Top Bottom