postgresql wildcard when parameter is -1 - Mailing list pgsql-novice

From ben sewell
Subject postgresql wildcard when parameter is -1
Date
Msg-id bf6c74d80608240101x2fdbc5c7v2df0fe9033cdd85@mail.gmail.com
Whole thread Raw
Responses Re: postgresql wildcard when parameter is -1  (Michael Fuhr <mike@fuhr.org>)
List pgsql-novice
Hi guys,
I'm still running into problems on my front end, but thats because of access, not postgres ;)

I have a question, when a parameter is recieved as -1 (as an integer from Access), I would like that parameter to be a wildcard. The logic is that I am sending the primary key for a table to postgres for a report but when there hasnt been a value chosen in the combo box -1 is sent to postgres so it would mean that that parameter don't apply in the SP, otherwise if it did have another value then the parameter would be used to do some filtering (joins).

Any ideas? Feel free to ask any questions if you want.

Cheers,
Ben

pgsql-novice by date:

Previous
From: "Jasbinder Bali"
Date:
Subject: Re: [GENERAL] Shared Objects (Dynamic loading)
Next
From: Bruno Wolff III
Date:
Subject: Re: protecting a database