Jeffrey Tenny <[EMAIL PROTECTED]> writes:
> If I want to allocate a block of adjacent values from a sequence generator,
> is the following statement atomic with respect to the time between
> when the call to nextval() and setval()?
> SELECT setval('foo', nextval()+20) ...
Nope.
> The goal is to
Alex,
Postgres's "select into" does not work like oracle.
The "select into" for postgresql creates another
table. Try this;
select aliasvalue || trim(arrayval[i]) into
newtablename from currenttablename where
trim(searchfield) like '%' ||
trim(searchvalue) || '%';
Stuart
--- A E <[EMAIL
If I want to allocate a block of adjacent values from a sequence generator,
is the following statement atomic with respect to the time between
when the call to nextval() and setval()?
SELECT setval('foo', nextval()+20) ...
The goal is to get a sequence of 20 values that are all +1 from each other.
Hi,
Could someone help me with quoting this right?
select into aliasvalue ''|| trim(arrayval[i]) ||'' from ''|| trim(realname) ||'' where ''|| trim(searchfield) ||'' like %''|| trim(searchvalue) ||''%;
The parser does not seem to want to put the value of the variables into the
El Lun 12 Ene 2004 22:12, David Witham escribió:
>DW: Hi,
>DW:
>DW: I have a query that returns data like this:
>DW:
>DW: cust_idcust_name month costrevenue margin
>DW: 991234 ABC 2003-07-01 10 15 5
>DW: 991234
On Jan 14, 2004, at 4:39 PM, [EMAIL PROTECTED] wrote:
got an error as below :
dwnc=> insert into biosadm.custdo_dim
dwnc-> (do_key,do_no,do_date,attnto,custlo)
dwnc-> select nextval('cdo_seq'),c.dono::varchar,c.dodate::date,
dwnc-> c.attnto, c.custlo from custdo_temp c;
ERROR: Bad date ext
Hi,
got an error as below :
dwnc=> insert into biosadm.custdo_dim
dwnc-> (do_key,do_no,do_date,attnto,custlo)
dwnc-> select nextval('cdo_seq'),c.dono::varchar,c.dodate::date,
dwnc-> c.attnto, c.custlo from custdo_temp c;
ERROR: Bad date external representation ''
Table structure (cu