| View previous topic :: View next topic |
| Author |
Message |
zazu General User

Joined: 06 Mar 2010 Posts: 37 Location: New Zealand
|
Posted: Sat Mar 06, 2010 11:31 pm Post subject: IF statement in query to create new field [Solved] |
|
|
I'm new to OOo.
In MSAccess I was able to create a new field in a query in design view using an IF statement like:
Aid:IIF(Customer!LegalAid="Yes","Legal Aid Available","Legal Aid Denied")
Customer is a table and LegalAid is a Yes/No field. The resultant query would give me a new heading "Aid" and each customer would have the output of either Legal Aid Available or Legal Aid Denied in the Aid column
How do I achieve the same in OOo. I've read forums. wiki and a whole lot of other stuff, but have not been able to follow all the discussion relating to sql statements and the like
Last edited by zazu on Wed Mar 10, 2010 4:57 pm; edited 1 time in total |
|
| Back to top |
|
 |
RPG Super User

Joined: 24 Apr 2008 Posts: 2696 Location: Apeldoorn, Netherland
|
Posted: Sun Mar 07, 2010 1:46 am Post subject: |
|
|
Hello
I think you need case when
see here
Romke |
|
| Back to top |
|
 |
zazu General User

Joined: 06 Mar 2010 Posts: 37 Location: New Zealand
|
Posted: Sun Mar 07, 2010 1:58 am Post subject: |
|
|
| Thanks. CASEWHEN worked |
|
| Back to top |
|
 |
|