pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
REPOST[GENERAL] Quoting for a Select Into - Please Help
2+ messages / 2 participants
[nested] [flat]

* REPOST[GENERAL] Quoting for a Select Into - Please Help
@ 2004-01-14 22:47  A E <cooljoint@yahoo.com>
  0 siblings, 1 reply; 2+ messages in thread

From: A E @ 2004-01-14 22:47 UTC (permalink / raw)
  To: pgsql-sql

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 statement.
 
Alex

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: REPOST[GENERAL] Quoting for a Select Into - Please Help
@ 2004-01-15 03:17  Stuart Barbee <sfbarbee@yahoo.com>
  parent: A E <cooljoint@yahoo.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Stuart Barbee @ 2004-01-15 03:17 UTC (permalink / raw)
  To: pgsql-sql

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 <cooljoint@yahoo.com> wrote:
> 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 statement.
>  
> Alex
> 
> 


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2004-01-15 03:17 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-01-14 22:47 REPOST[GENERAL] Quoting for a Select Into - Please Help A E <cooljoint@yahoo.com>
2004-01-15 03:17 ` Stuart Barbee <sfbarbee@yahoo.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox