Skip site navigation (1) Skip section navigation (2)

Re: NULLs in ecpg

From: Edmund Bacon <ebacon(at)onesystem(dot)com>
To: wespvp(at)syntegra(dot)com
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: NULLs in ecpg
Date: 2004-07-16 16:39:19
Message-ID: 40F804B7.2090101@onesystem.com (view raw or flat)
Thread:
Lists: pgsql-interfaces
wespvp(at)syntegra(dot)com wrote:
> On 7/16/04 11:11 AM, "Edmund Bacon" <ebacon(at)onesystem(dot)com> wrote:
> 
> 
>>Indicators works as expected.  e.g.:
>>
>>EXEC SQL INSERT INTO sometable
>>        VALUES (:v1 :v1_ind, 'foo', :v2 :v2_ind);
> 
> 
> Hmm.  I tried that.  Just tried it again and it worked.  Must have had a
> typo before.  Sorry.
> 
> What about if I have something like:
> 
>  ... VALUES (TO_TIMESTAMP(:expirationDate, 'YYYYMMDDHH24MISS'), 'foo', :v2)
> 
> How can I insert NULLS for expirationDate when there's a function in the
> way?  Using
> 
>    ... VALUES (TO_TIMESTAMP(:expirationDate, 'YYYYMMDDHH24MISS') :ind1, ...
> 
> won't work.

No, but
  ... VALUES (TO_TIMESTAMP(:expirationDate :ind1, 'YYYYMMDDHH24MISS'), ..
should

-- 
Edmund Bacon <ebacon(at)onesystem(dot)com>

In response to

Responses

pgsql-interfaces by date

Next:From: miguel lamDate: 2004-07-16 20:11:21
Subject: C++ Procedural Language or something like this
Previous:From: wespvpDate: 2004-07-16 16:25:59
Subject: Re: NULLs in ecpg

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group