pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jaime Casanova <systemguards@gmail.com>
To: Manso Gomez, Ramon <rmgomez@indra.es>
Cc: pgsql-sql@postgresql.org
Subject: Re: dinamic sql
Date: Tue, 29 Aug 2006 07:33:42 -0500
Message-ID: <c2d9e70e0608290533m3cb823d4s3be0455c2f2c4647@mail.gmail.com> (raw)
In-Reply-To: <12B09E52EF3AEF41AEF3D205BD4DF4651FAE8D@MADARRMAIL3.indra.es>
References: <12B09E52EF3AEF41AEF3D205BD4DF4651FAE8D@MADARRMAIL3.indra.es>

On 8/29/06, Manso Gomez, Ramon <rmgomez@indra.es> wrote:
>
> if(user_Input = 'a')
> l_query := l_query||a_from_clause ||'where ename in '||user_Input
> else
> if(user_Input = 'b')
> l_query := l_query||b_from_clause||'where ename in '||user_Input
>
> OPEN csr FOR l_query;
>

l_query := l_query || a_from_clause
                              || 'where ename in (' ||
quote_literal(user_input) || ')'

-- 
regards,
Jaime Casanova

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots.
So far, the universe is winning."
                                       Richard Cook



view thread (2+ messages)

Message-ID: <c2d9e70e0608290533m3cb823d4s3be0455c2f2c4647@mail.gmail.com>
Permalink:  ../c2d9e70e0608290533m3cb823d4s3be0455c2f2c4647@mail.gmail.com/
Also on:    postgresql.org/message-id/c2d9e70e0608290533m3cb823d4s3be0455c2f2c4647@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: systemguards@gmail.com, rmgomez@indra.es
  Subject: Re: dinamic sql
  In-Reply-To: <c2d9e70e0608290533m3cb823d4s3be0455c2f2c4647@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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