OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

IF statement in query to create new field [Solved]

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
zazu
General User
General User


Joined: 06 Mar 2010
Posts: 37
Location: New Zealand

PostPosted: Sat Mar 06, 2010 11:31 pm    Post subject: IF statement in query to create new field [Solved] Reply with quote

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
View user's profile Send private message
RPG
Super User
Super User


Joined: 24 Apr 2008
Posts: 2697
Location: Apeldoorn, Netherland

PostPosted: Sun Mar 07, 2010 1:46 am    Post subject: Reply with quote

Hello

I think you need case when

see here

Romke
Back to top
View user's profile Send private message
zazu
General User
General User


Joined: 06 Mar 2010
Posts: 37
Location: New Zealand

PostPosted: Sun Mar 07, 2010 1:58 am    Post subject: Reply with quote

Thanks. CASEWHEN worked
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group