Find fields containing Negative Numbers (1 Viewer)

m6n6

New member
Local time
Today, 01:47
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?
 

namliam

The Mailman - AWF VIP
Local time
Today, 07:47
Joined
Aug 11, 2003
Messages
11,696
You are going to have to search each column somehow... sorry...
 

Dennisk

AWF VIP
Local time
Today, 06:47
Joined
Jul 22, 2004
Messages
1,649
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.
 

WIS

Registered User.
Local time
Today, 15:47
Joined
Jan 22, 2005
Messages
170
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.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 06:47
Joined
Sep 12, 2006
Messages
15,632
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

Top Bottom