Re: [SQL] Substring

2009-09-04 Thread Raj Mathur
On Saturday 05 Sep 2009, Frank Bax wrote: > Raj Mathur wrote: > > On Saturday 05 Sep 2009, bilal ghayyad wrote: > >> I have an sql script function that take one text parameter "funct > >> (text)", what I need to do is the following: > >> > >> If the parameter name is string and its value was for ex

Re: [SQL] Substring

2009-09-04 Thread Frank Bax
Raj Mathur wrote: On Saturday 05 Sep 2009, bilal ghayyad wrote: I have an sql script function that take one text parameter "funct (text)", what I need to do is the following: If the parameter name is string and its value was for example "abcd" then I need to do a query based on ab and then base

Re: [SQL] How to simulate (run) the function

2009-09-04 Thread Scott Marlowe
On Fri, Sep 4, 2009 at 8:43 PM, bilal ghayyad wrote: > Hello; > > I have an SQL function and I need to know how to simulate it (calling it and > pass for it the argument and see what the value it returns), HOW? Can I do > this from the pgAdminIII GUI or from the CLI? > > This method help to check

[SQL] How to simulate (run) the function

2009-09-04 Thread bilal ghayyad
Hello; I have an SQL function and I need to know how to simulate it (calling it and pass for it the argument and see what the value it returns), HOW? Can I do this from the pgAdminIII GUI or from the CLI? This method help to check that the function is working fine specially if it will be calle

Re: [SQL] Substring

2009-09-04 Thread Raj Mathur
On Saturday 05 Sep 2009, bilal ghayyad wrote: > I have an sql script function that take one text parameter "funct > (text)", what I need to do is the following: > > If the parameter name is string and its value was for example "abcd" > then I need to do a query based on ab and then based on the abc

[SQL] Substring

2009-09-04 Thread bilal ghayyad
Hello; I have an sql script function that take one text parameter "funct (text)", what I need to do is the following: If the parameter name is string and its value was for example "abcd" then I need to do a query based on ab and then based on the abc, how? Example: SELECT * from voipdb where