sorry, i resubmit to the list
On 7/18/07, Jaime Casanova <[EMAIL PROTECTED]> wrote:
On 7/18/07, Norm Garand <[EMAIL PROTECTED]> wrote:
> Thanks Jaime:
>
> I tried using the CASE function and it still didn't work.
>
> What I need to do is set a conditional, so that if the parameter is NULL,
then
007 23:43
Para: pgsql-sql@postgresql.org
Asunto: [SQL] Inserting an IF statement in the middle of a SELECT in
pl/pgSQL code
Hi:
I can't seem to resolve this issue. I have a fair sized SELECT statement
that runs properly in a
stored procedure using pl/pgSQL, but I have certain parts of the quer
On 7/17/07, Norm Garand <[EMAIL PROTECTED]> wrote:
In the WHERE portion of the SELECT statment, I'd like to insert the IF
statement shown below. I've
tried single and double quotes and the pipeline for concatenation, but nothing
seems to work. Any
suggestions or resolutions would be greatly app
On 7/17/07, Norm Garand <[EMAIL PROTECTED]> wrote:
/---
IF $7 IS NOT NULL THEN
AND f.id = pid.specific_location_cid AND f.long_desc = $7
END IF
---/
How about:
AND f.ID = pid.specific_location_cid
AND f.long_desc = COALESCE ($7, f.long_desc)
---
Hi:
I can't seem to resolve this issue. I have a fair sized SELECT statement that
runs properly in a
stored procedure using pl/pgSQL, but I have certain parts of the query that can
filter by a NULL
value, or a character string.
What I can't seem to do is insert a conditional IF statement in my c