On Mar 30, 2005, at 9:34 AM, Shaun Clements wrote:

PERFORM distinct COLUMN1 FROM TABLE where COLUMN1 = ''''|| quote_literal(VARIABLE1)'' ||'' AND COLUMN2 = ''''||quote_literal(VARIABLE2)||'''';

The first one you posted looked correct. This line above seems to have problems. I think you want this:



PERFORM distinct COLUMN1 FROM TABLE where COLUMN1 = '''' || quote_literal(VARIABLE1) '''' || '' AND COLUMN2 = '' || '''' || quote_literal(VARIABLE2) || '''';



Generally PERFORM is used for side effects only. I don't see why you would use PERFORM unless this line will change the database somehow.


John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply via email to