Re: plpgsql.. SELECT INTO ... WHERE FIELD LIKE - Mailing list pgsql-sql

From Christopher Browne
Subject Re: plpgsql.. SELECT INTO ... WHERE FIELD LIKE
Date
Msg-id 32f2ctF3laeu6U1@individual.net
Whole thread Raw
In response to plpgsql.. SELECT INTO ... WHERE FIELD LIKE  ("Yudie" <yudie@axiontech.com>)
List pgsql-sql
Try:  SELECT INTO RS ID FROM CUSTOMER WHERE FIRSTNAME LIKE KEYWORD || ''%'' LIMIT 1;

You append KEYWORD and a '%' together using ||.  You need to use
doubled quotes inside the quoted environment; one gets stripped off so
that the stored procedure will contain the query
  SELECT INTO RS ID FROM CUSTOMER WHERE FIRSTNAME LIKE KEYWORD || '%'' LIMIT 1;
-- 
let name="cbbrowne" and tld="gmail.com" in name ^ "@" ^ tld;;
http://linuxfinances.info/info/sgml.html
C is almost a real language. (see assembler) Even the name sounds like
it's gone through  an optimizing  compiler.  Get  rid of  all of those
stupid brackets and we'll talk. (see LISP)


pgsql-sql by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: plpgsql.. SELECT INTO ... WHERE FIELD LIKE
Next
From: Christopher Browne
Date:
Subject: Re: plpgsql.. SELECT INTO ... WHERE FIELD LIKE