Re: [SQL] Need help with CASE statement in Function

2007-10-03 Thread Richard Broersma Jr
--- Hengky Lie <[EMAIL PROTECTED]> wrote: > My Question is : How to make argument 4 optional ? When IS NULL the function > will show all transaction between date $1 and $2 and product ID=$3 Could you simply overload your function by having two functions? One with arguement 4 and one without? R

Re: [SQL] Need help with CASE statement in Function

2007-10-03 Thread Dawid Kuroczko
On 10/3/07, Hengky Lie <[EMAIL PROTECTED]> wrote: > Dear friends, > I am a new user to postgreSQL and really need help to solve my "stupid ?" > problem. > > I have created function with 4 arguments like this : > > CREATE OR REPLACE FUNCTION "public"."fHistoryCard" (begdate date, enddate > date, Pr

[SQL] Need help with CASE statement in Function

2007-10-03 Thread Hengky Lie
Dear friends, I am a new user to postgreSQL and really need help to solve my "stupid ?" problem. I have created function with 4 arguments like this : CREATE OR REPLACE FUNCTION "public"."fHistoryCard" (begdate date, enddate date, ProductID varchar, storeID varchar) RETURNS SETOF "publi