| View previous topic :: View next topic |
| Author |
Message |
un-kindhearted Newbie

Joined: 19 Sep 2008 Posts: 1 Location: Philippines
|
Posted: Fri Sep 19, 2008 2:18 am Post subject: how to use the conditional statement if else? |
|
|
please help me. our school has just started to use Ubuntu, and with regards to making databases, we are using openoffice freeware products.. please help me. and happy programming to all. ^_^
how to use the conditional statement if else in the coding? thats my question... ^_^ _________________ we are all programs. |
|
| Back to top |
|
 |
brian4m OOo Enthusiast

Joined: 13 Feb 2006 Posts: 160 Location: Bath, England
|
Posted: Wed Oct 01, 2008 12:41 pm Post subject: |
|
|
I think you need to consider the CASE expression.
A condition such as
If a= b then action 1, if a<b then action2 else action3
becomes, in sql,
CASE WHEN a=b THEN action1 WHEN a<b THEN action2 ELSE action3 END
Brian |
|
| Back to top |
|
 |
|