X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E810E3B75B3 for ; Fri, 17 Dec 2004 03:34:01 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 31702-05 for ; Fri, 17 Dec 2004 03:33:51 +0000 (GMT) Received: from floppy.pyrenet.fr (floppy.pyrenet.fr [194.250.190.2]) by svr1.postgresql.org (Postfix) with ESMTP id C7D3C3CB9B2 for ; Fri, 17 Dec 2004 03:33:53 +0000 (GMT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id CA6BE31959; Fri, 17 Dec 2004 04:33:52 +0100 (MET) From: Christopher Browne X-Newsgroups: pgsql.sql Subject: Re: plpgsql.. SELECT INTO ... WHERE FIELD LIKE Date: 17 Dec 2004 03:33:49 GMT Organization: cbbrowne Computing Inc Lines: 14 Message-ID: <32f2ctF3laeu6U1@individual.net> References: <001901c4e3ca$7c71aca0$a101a8c0@home.axiontech.com> X-Draft-From: ("nntp+wolfe:pgsql.sql" 165) X-message-flag: Outlook is rather hackable, isn't it? X-Home-Page: http://www.cbbrowne.com/info/ X-Affero: http://svcs.affero.net/rm.php?r=cbbrowne To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.43 tagged_above=0 required=5 tests=AWL, INFO_TLD, UPPERCASE_25_50 X-Spam-Level: X-Archive-Number: 200412/110 X-Sequence-Number: 19730 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)