From ramgv80@yahoo.com Wed Apr 8 12:03:02 2009 Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 1E2DA633377 for ; Wed, 8 Apr 2009 09:03:02 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 82928-05 for ; Wed, 8 Apr 2009 09:03:00 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from web33404.mail.mud.yahoo.com (web33404.mail.mud.yahoo.com [68.142.206.136]) by mail.postgresql.org (Postfix) with SMTP id 80394632E53 for ; Wed, 8 Apr 2009 09:02:58 -0300 (ADT) Received: (qmail 96105 invoked by uid 60001); 8 Apr 2009 11:56:17 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1239191777; bh=07kuaUYyAJVj9BTR82DrW1/yeVq/6HOHyu3BZPWJB4Q=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=rrTrcfwiaauvlQRp1NGxnmnaC8JLZjMTWgdexWsm3Whs69nJBeIxroZNcoVDVuMYtq1K6sTVB+UsMJVGEvj2t77KA0KHdjrCX4AWsFdBmVLHLEfwC3W4cuM5IXlaQb2c8tkEWpYEwuo83MDDi6MVA6RKgoVczxGiFF1g8sLJLGE= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=HgfbchTTSDO2akDPjPYNW67lMwNDBwwg5Rqy9zHWdFTsveGOW3mQXps1FO7SAQS4N/M7JbHiI4ya9kzRZE+1Tw/3AOym6JER4pEW+uXU976m2hYWYfE5JpEwX9C/8m8SAiUwpgRG6uwrFJPUkHPLf9Er/Ijg5NRfhG0ML8gMP7w=; Message-ID: <358805.94828.qm@web33404.mail.mud.yahoo.com> X-YMail-OSG: X5Qcj5UVM1k44eaFn2DE.qR60RTPZMplXHF0AHxd7SPUzRRnaRyPn_ULFP_sSF84SWhwmFvpJmTdSMYk0gj204ER8GYkbkkLkBMZ0PY2j7l0.6hnOjPkIS7mA8QKg0WqPHF0_c9I4Oay7tph9ZaqXrLX3EDLJoy9gML2c_H31eIQIH.S0abbEPjciuMWPX4EYC4ssRweFYwuCMaxa2y4pZ7etCWwMWy9NjXyShvki_EfwrNDf.AKAkbquXd9e.Q2zvWeArJhy6COaAHqmmqsIYH178XZy9SZQP.1208FW5OIcV8wxnA- Received: from [164.164.87.57] by web33404.mail.mud.yahoo.com via HTTP; Wed, 08 Apr 2009 04:56:17 PDT X-Mailer: YahooMailRC/1277.35 YahooMailWebService/0.7.289.1 Date: Wed, 8 Apr 2009 04:56:17 -0700 (PDT) From: ram subbu Subject: String Formula to calculate the value To: Kris Jurka , pgsql-jdbc@postgresql.org, pgsql-jdbc@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1585830621-1239191777=:94828" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200904/36 X-Sequence-Number: 19483 --0-1585830621-1239191777=:94828 Content-Type: text/plain; charset=us-ascii Dear All, I am having a formula String say====> (a+b*c)/2 I need to pass the dynamic value to these a,b,c and i need to calculate the value. please help me out to write a procedure to do all these stufs. --0-1585830621-1239191777=:94828 Content-Type: text/html; charset=us-ascii
Dear All,
    I am having a formula String
say====> (a+b*c)/2
I need to pass the dynamic value to these a,b,c
 
and i need to calculate the value.
please help me out to write a procedure to do all these stufs.

--0-1585830621-1239191777=:94828-- From laurenz.albe@wien.gv.at Thu Apr 9 05:49:18 2009 Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 9EFD563362D for ; Thu, 9 Apr 2009 02:49:18 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 96525-06 for ; Thu, 9 Apr 2009 02:49:17 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from relay-fr112.magwien.gv.at (relay-fr112.magwien.gv.at [217.149.225.66]) by mail.postgresql.org (Postfix) with ESMTP id 51BA36335FF for ; Thu, 9 Apr 2009 02:49:16 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by relay-fr112.magwien.gv.at (Postfix) with ESMTP id B08534C5A27; Thu, 9 Apr 2009 07:49:14 +0200 (CEST) X-Virus-Scanned: by amavisd-new using Sophie and ClamAV at magwien.gv.at Received: from exrat0.host.magwien.gv.at (exrat0.host.magwien.gv.at [10.153.17.24]) by relay-fr112.magwien.gv.at (Postfix) with ESMTP id BAD1D4C59EB; Thu, 9 Apr 2009 07:49:13 +0200 (CEST) Received: from exadv11.host.magwien.gv.at ([10.153.17.1]) by exrat0.host.magwien.gv.at with Microsoft SMTPSVC(6.0.3790.3959); Thu, 9 Apr 2009 07:49:11 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: Re: String Formula to calculate the value Date: Thu, 9 Apr 2009 07:49:11 +0200 Message-ID: In-Reply-To: <358805.94828.qm@web33404.mail.mud.yahoo.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [JDBC] String Formula to calculate the value Thread-Index: Acm4fexouQYTlReoTayIDngfhWQ/ygAWFSYg References: <358805.94828.qm@web33404.mail.mud.yahoo.com> From: "Albe Laurenz *EXTERN*" To: "ram subbu *EXTERN*" , X-OriginalArrivalTime: 09 Apr 2009 05:49:12.0033 (UTC) FILETIME=[E8854510:01C9B8D6] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200904/39 X-Sequence-Number: 19486 ram subbu wrote: > I am having a formula String > say=3D=3D=3D=3D> (a+b*c)/2 > I need to pass the dynamic value to these a,b,c=20 > =20 > and i need to calculate the value. > please help me out to write a procedure to do all these stufs. The easiest way I can think of is to use string replacement to replace the letters with the numbers. You can do that in Java, but also in a PL/pgSQL function. Then execute "SELECT ", which will give you the result. Yours, Laurenz Albe From peter@greatnowhere.com Thu Apr 9 06:48:37 2009 Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 9C3786332A5 for ; Thu, 9 Apr 2009 03:48:37 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 56686-07 for ; Thu, 9 Apr 2009 03:48:33 -0300 (ADT) Received: from mx1.hub.org (mx1.hub.org [200.46.208.106]) by mail.postgresql.org (Postfix) with ESMTP id C26196331E9 for ; Thu, 9 Apr 2009 03:48:33 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail2.fintrading.com (mail.fintrading.com [195.2.100.100]) by mx1.hub.org (Postfix) with ESMTP id E5F26125A7D2 for ; Thu, 9 Apr 2009 03:48:28 -0300 (ADT) Received: from chipmunk (unknown [81.198.70.254]) by mail2.fintrading.com (Postfix) with ESMTPA id F0FD8381139D for ; Thu, 9 Apr 2009 09:47:33 +0300 (EEST) From: "Peter" To: References: <358805.94828.qm@web33404.mail.mud.yahoo.com> In-Reply-To: <358805.94828.qm@web33404.mail.mud.yahoo.com> Subject: Re: String Formula to calculate the value Date: Thu, 9 Apr 2009 09:47:27 +0300 Message-ID: <021601c9b8df$0fb04d80$2f10e880$@com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0217_01C9B8F8.34FD8580" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Acm4ZBxul80mCEg9TZ2XI2V2U5bY5AAephcw Content-Language: en-us X-MailScanner-ID: F0FD8381139D.0B69B X-greatnowhere.com-MailScanner: Found to be clean X-greatnowhere.com-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-6.799, required 6, autolearn=not spam, ALL_TRUSTED -1.80, BAYES_00 -5.00, HTML_MESSAGE 0.00) X-greatnowhere.com-MailScanner-From: peter@greatnowhere.com MailScanner-NULL-Check: 1239864455.37145@KXbWELB2hH4/r/67z1O9GQ X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200904/40 X-Sequence-Number: 19487 This is a multipart message in MIME format. ------=_NextPart_000_0217_01C9B8F8.34FD8580 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable You could use plPerl =E2=80=93 it is very well suited for string = manipulation. Also there is eval() function that can be used for = formulas like yours. =20 From: pgsql-jdbc-owner@postgresql.org = [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of ram subbu Sent: Wednesday, April 08, 2009 2:56 PM To: Kris Jurka; pgsql-jdbc@postgresql.org; pgsql-jdbc@postgresql.org Subject: [JDBC] String Formula to calculate the value =20 Dear All, I am having a formula String say=3D=3D=3D=3D> (a+b*c)/2 I need to pass the dynamic value to these a,b,c=20 =20 and i need to calculate the value. please help me out to write a procedure to do all these stufs. =20 ------=_NextPart_000_0217_01C9B8F8.34FD8580 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

You could use plPerl =E2=80=93 it is very=C2=A0 well = suited for string manipulation. Also there is eval() function that can be used for = formulas like yours.

 

From:= pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org] = On Behalf Of ram subbu
Sent: Wednesday, April 08, 2009 2:56 PM
To: Kris Jurka; pgsql-jdbc@postgresql.org; = pgsql-jdbc@postgresql.org
Subject: [JDBC] String Formula to calculate the = value

 

Dear All,

  &= nbsp; I am having a formula String

say=3D=3D=3D=3D= > (a+b*c)/2

I need to pass the dynamic value to these a,b,c

 

and i need to calculate the value.

please help me out to write a procedure to do all these = stufs.

 

------=_NextPart_000_0217_01C9B8F8.34FD8580--