[firebird-support] Multiple WHERE clauses

2015-02-22 Thread venussof...@gmail.com [firebird-support]
Hi all I have a SELECT statement which needs to have a WHERE clause adapt if a variable has a value or not: WHERE CASE WHEN 72 <> 0 THEN tDevelopment.iID = 72 ELSE (CAST(tDevelopment.tDT AS DATE) BETWEEN (SELECT US1.dValue FROM dSetValue('Current Year', 'From') US1) AND (

RE: [firebird-support] Multiple WHERE clauses

2015-02-22 Thread 'Leyne, Sean' s...@broadviewsoftware.com [firebird-support]
Bhavbhuti, > I have a SELECT statement which needs to have a WHERE clause adapt if a > variable has a value or not: > >     WHERE CASE WHEN 72 <> 0 THEN tDevelopment.iID = 72 >     ELSE (CAST(tDevelopment.tDT AS DATE) BETWEEN (SELECT US1.dValue >     FROM dSetValue('Current Year', 'From') US1

RE: [firebird-support] Multiple WHERE clauses

2015-02-22 Thread Svein Erling Tysvær svein.erling.tysv...@kreftregisteret.no [firebird-support]
ent: 23. februar 2015 06:25 To: firebird-support@yahoogroups.com Subject: [firebird-support] Multiple WHERE clauses Hi all I have a SELECT statement which needs to have a WHERE clause adapt if a variable has a value or not: WHERE CASE WHEN 72 <> 0 THEN tDevelopment.iID = 72

Re: [firebird-support] Multiple WHERE clauses

2015-02-23 Thread Venus Software Operations venussof...@gmail.com [firebird-support]

Re: [firebird-support] Multiple WHERE clauses

2015-02-24 Thread Venus Software Operations venussof...@gmail.com [firebird-support]

Re: [firebird-support] Multiple WHERE clauses

2015-02-24 Thread Venus Software Operations venussof...@gmail.com [firebird-support]

Re: [firebird-support] Multiple WHERE clauses

2015-02-25 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Sean: Which is the difference between it: WHERE 1 = CASE WHEN (Param <> 0) THEN 1 WHEN (Some OtherTest) THEN 1 WHEN (Yet another Test) THEN 1 ELSE 0 END and it: Param <> 0 OR SomeOtherTest OR YetAnotherTest ? Because I get the same result with both ways. Greetings. Walter. On Wed, Feb 25,