Quotes in dynamic sql

From: A E <cooljoint(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Quotes in dynamic sql
Date: 2003-12-30 19:22:45
Message-ID: 20031230192245.23650.qmail@web12103.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I am trying to execute dynamic sql but I can't seem to get the qoutes right.

My code is

qry := ''SELECT * from ''|| trim(realname) ||'' where crmid like %''|| trim(crmid) ||''%'';

Can anyone help?

Alex

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dima Tkach 2003-12-30 19:44:53 'like' refuses to use an index???
Previous Message Bret Busby 2003-12-30 19:09:21 Re: [pgsql-advocacy] Is my MySQL Gaining ?