Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combining Values

Status
Not open for further replies.

Gojira999

Technical User
Jun 22, 2004
57
0
0
GB
Hello again generous friends!

I am building a query that extracts the values from two fields on a form and, dependent of the values, allocates a value to a table field.

I have tried using the following as my field in the query:

value3:if (value1=0 and value2 =0) then value3=0 else value3=1

but I get a syntax error.

Is this the right way to approach this or am I missing something?

Thanks.
 
Another way:
value3: Abs(value1<>0 Or value2<>0)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
phv, that may work but it's far too obscure

one of the objectives of creating sql solutions is that you should be able to understand them

no star for you, sorry

:)

rudy
SQL Consulting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top