Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 4 of 4 total |
SQL syntax |
Tue, Mar 23 2010 11:15 PM | Permanent Link |
Robert Kaplan | Is there a way to have something like
SELECT IF (CONDITION 3 ELSE 4) MYCODE FROM TABLEA WHERE MYCODE <> SOMEFIELD IOW once I create mycode, to be able to use it just like any other column, even something like SELECT IF (CONDITION 3 ELSE 4) MYCODE FROM TABLEA JOIN TABLEB ON TABLEB.FIELD = MYCODE I suspect the answer is no, but who knows. Robert |
Wed, Mar 24 2010 5:59 AM | Permanent Link |
John Hay | Rober
> IOW once I create mycode, to be able to use it just like any other column, > even something like > > SELECT > IF (CONDITION 3 ELSE 4) MYCODE > FROM TABLEA > JOIN TABLEB ON TABLEB.FIELD = MYCODE The following should work SELECT IF (CONDITION 3 ELSE 4) MYCODE FROM TABLEA JOIN TABLEB ON TABLEB.FIELD = IF (CONDITION 3 ELSE 4) John |
Wed, Mar 24 2010 6:39 AM | Permanent Link |
John Hay | Robert
The actual syntax for DBIsam is SELECT IF (CONDITION THEN 3 ELSE 4) MYCODE FROM TABLEA JOIN TABLEB ON TABLEB.FIELD = IF (CONDITION THEN 3 ELSE 4) John |
Wed, Mar 24 2010 7:28 AM | Permanent Link |
Robert Kaplan | "John Hay" <j.haywithoutdot@crbsolutionsremoveallthis.co.uk> wrote in message news:350500BE-BB01-4714-B65A-E74072501779@news.elevatesoft.com... > JOIN TABLEB ON TABLEB.FIELD = IF (CONDITION THEN 3 ELSE 4) > Thanks John, that's what I've always done, I was looking for a way to eliminate the restating of the IF clause. Robert |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |