Re: IF NOT EXIST

2018-12-18 Thread Adrian Klaver
On 12/18/18 12:02 AM, Alban Hertroys wrote: On 18 Dec 2018, at 7:10, Igor Korot wrote: Hi, ALL, I have a following statement: IF NOT EXIST( SELECT 1 SELECT 1 FROM pg_proc AS proc, pg_namespace AS ns ) CREATE FUNCTION(); Unfortunately trying to execute it thru the ODBC interface with: ret

Re: IF NOT EXIST

2018-12-18 Thread Alban Hertroys
> On 18 Dec 2018, at 7:10, Igor Korot wrote: > > Hi, ALL, > I have a following statement: > > IF NOT EXIST( SELECT 1 SELECT 1 FROM pg_proc AS proc, pg_namespace AS > ns ) CREATE FUNCTION(); > > Unfortunately trying to execute it thru the ODBC interface with: >

Re: IF NOT EXIST

2018-12-17 Thread Pavel Stehule
Hi Ășt 18. 12. 2018 v 7:11 odesĂ­latel Igor Korot napsal: > Hi, ALL, > I have a following statement: > > IF NOT EXIST( SELECT 1 SELECT 1 FROM pg_proc AS proc, pg_namespace AS > ns ) CREATE FUNCTION(); > > Unfortunately trying to execute it thru the ODBC interface with: &g

IF NOT EXIST

2018-12-17 Thread Igor Korot
Hi, ALL, I have a following statement: IF NOT EXIST( SELECT 1 SELECT 1 FROM pg_proc AS proc, pg_namespace AS ns ) CREATE FUNCTION(); Unfortunately trying to execute it thru the ODBC interface with: ret = SQLExecDirect( m_hstmt, query, SQL_NTS ); gives syntax error near IF. What is the proper