X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 5B160D1B592 for ; Mon, 6 Oct 2003 13:08:03 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 55732-10 for ; Mon, 6 Oct 2003 10:07:16 -0300 (ADT) Received: from smtp101.mail.sc5.yahoo.com (smtp101.mail.sc5.yahoo.com [216.136.174.139]) by svr1.postgresql.org (Postfix) with SMTP id C9CE9D1B51E for ; Mon, 6 Oct 2003 10:07:11 -0300 (ADT) Received: from ptil-138-190-chn.primus-india.net (HELO IVESIA67) (sgnerd@203.196.190.138 with login) by smtp.mail.vip.sc5.yahoo.com with SMTP; 6 Oct 2003 13:00:11 -0000 Message-ID: <017801c38c0a$7e4bbc00$7502a8c0@hdsc.com> Reply-To: "Kumar" From: "Kumar" To: "psql" Subject: Converting Query from MS SQL Date: Mon, 6 Oct 2003 18:34:45 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0171_01C38C38.83B1CA30" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.7 tagged_above=0.0 required=5.0 tests=HTML_40_50 X-Spam-Level: X-Archive-Number: 200310/65 X-Sequence-Number: 15465 This is a multi-part message in MIME format. ------=_NextPart_000_0171_01C38C38.83B1CA30 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Dear Friends, I am working with Postgres 7.3.4 on RH Linux 7.2. While migrating all the S= Ps (from MS SQL Server), I come across these lines in MS SQL Server procedu= re. SET @v_sql =3D "UPDATE "Schema1".employee SET rec_deleted_flag =3D 'Y' WHER= E empid IN (" + @p_list_ids + ");" EXEC(@v_sql) Actually to dynamically pass the values for the 'IN' the pass the @p_list_= ids (a comma separated string ) to the variable @v_sql and then execute it. How can I change it for postgres? Thank you very much for ur support Regards Kumar ------=_NextPart_000_0171_01C38C38.83B1CA30 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Dear Friends,
 
I am working with Postgres 7.3.4 on RH Linux 7.2. = While=20 migrating all the SPs (from MS SQL Server), I come across these lines in MS= SQL=20 Server procedure.
 
SET @v_sql =3D "UPDATE "Schema1".employee SET=20 rec_deleted_flag =3D 'Y' WHERE empid IN (" + @p_list_ids +=20 ");"
 EXEC(@v_sql)
 
Actually to dynamically pass the values for the 'IN' th= e pass=20 the  @p_list_ids (a comma separated string ) to the variable @v_sql an= d=20 then execute it.
 
How can I change it for postgres?
 
Thank you very much for ur support
 
 
Regards
Kumar

------=_NextPart_000_0171_01C38C38.83B1CA30--