Received: from qmsql.netservers.net (hpmail1.netservers.net [209.196.128.163]) by postgresql.org (Postfix) with SMTP id 056AA475D4C for ; Sat, 16 Mar 2002 16:58:04 -0500 (EST) Received: (qmail 43493 invoked from network); 16 Mar 2002 21:58:04 -0000 Received: from unknown (HELO AARON) (66.26.63.73) by hpmail1.netservers.net with SMTP; 16 Mar 2002 21:58:04 -0000 Message-ID: <00e901c1cd34$edd88cb0$110a010a@headquarters.wcgroup.com> From: "Samuel J. Sutjiono" To: , Subject: Variable Substitution for table name Date: Sat, 16 Mar 2002 16:52:54 -0500 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00E6_01C1CD0B.048E6620" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Archive-Number: 200203/876 X-Sequence-Number: 22248 This is a multi-part message in MIME format. ------=_NextPart_000_00E6_01C1CD0B.048E6620 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello all, Does anybody know whether I can do variable substitution in PostgreSQL func= tion ??? create function Test(text) returns text as ' DECLARE=20=20 NewView ALIAS for $1; =20=20=20=20=20=20=20=20 BEGIN For rec_set IN SELECT DeptdID, VendorName from NewView where (DeptID =3D iDeptID)=20 I appreciate any help very much. ------=_NextPart_000_00E6_01C1CD0B.048E6620 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hello all,
 
Does anybody know whether I can do variabl= e=20 substitution in PostgreSQL function ???
 
create function Test(text= ) returns=20 text as '
DECLARE  
  NewView ALIAS f= or=20 $1;
       
BEGIN
 
 For rec_set IN SELECT DeptdID,=20 VendorName
 from NewView where  (DeptID =3D i= DeptID)=20
 
I appreciate any help very much.
 
------=_NextPart_000_00E6_01C1CD0B.048E6620--