![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 5 of 5 total |
![]() |
Fri, Nov 28 2008 5:45 AM | Permanent Link |
Lelsie | Hi,
Is there any other way to use conditions for field selection in a select query beside coalesce? I remember seeing such example somewhere in the forums, but cannot find it and there is no sign of it in the documentation either, so I must be wrong. I mean something like: Select iif(Field1>1, Field1, Field2 ) as Field4 from ... or Select case when Field1>1 ... from ... Regards, Leslie |
Fri, Nov 28 2008 6:17 AM | Permanent Link |
"John Hay" | Lelsie
> Is there any other way to use conditions for field selection in a select query beside > coalesce? I remember seeing such example somewhere in the forums, but cannot find it and > there is no sign of it in the documentation either, so I must be wrong. > > I mean something like: > > Select > iif(Field1>1, Field1, Field2 ) as Field4 > from ... Check out the following link for the "If" systax. http://www.elevatesoft.com/manual?action=mantopic&id=edb2sql&category=13&topic=225 John |
Fri, Nov 28 2008 6:33 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Lelsie
I don't know about CASE but you were almost there with iif ![]() Here's a couple of examples IF(J._MainPhone IS NOT NULL THEN J._MainPhone ELSE Site._Switchboard) AS _MainPhone, IFNULL(W._LatestCV THEN FALSE ELSE TRUE) AS _HasCV Roy Lambert [Team Elevate] |
Fri, Nov 28 2008 7:01 AM | Permanent Link |
Leslie | John & Roy,
Thank you very much for the quick help. ![]() Leslie |
Mon, Dec 1 2008 9:27 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Leslie,
<< I mean something like: Select iif(Field1>1, Field1, Field2 ) as Field4 from ... or Select case when Field1>1 ... from ... >> Yes, you can use either syntax. Just change the IIF() to IF(). -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Wednesday, August 14, 2024 at 07:31 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |