Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id BC395633D36 for ; Mon, 22 Mar 2010 22:21:15 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 71525-02 for ; Tue, 23 Mar 2010 01:20:54 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from n6-vm0.bullet.mail.gq1.yahoo.com (n6-vm0.bullet.mail.gq1.yahoo.com [98.137.26.79]) by mail.postgresql.org (Postfix) with SMTP id 4DFBA633BC5 for ; Mon, 22 Mar 2010 22:21:00 -0300 (ADT) Received: from [67.195.9.83] by n6.bullet.mail.gq1.yahoo.com with NNFMP; 23 Mar 2010 01:20:58 -0000 Received: from [98.137.27.221] by t3.bullet.mail.gq1.yahoo.com with NNFMP; 23 Mar 2010 01:20:58 -0000 Received: from [127.0.0.1] by omp131.mail.gq1.yahoo.com with NNFMP; 23 Mar 2010 01:20:58 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 107904.1552.bm@omp131.mail.gq1.yahoo.com Received: (qmail 35593 invoked by uid 60001); 23 Mar 2010 01:20:58 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1269307258; bh=eaRrQybG1U/yNoOuycGY0ntlFVGBeK47MxcNKhJ/dPY=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=DgUDvHahv2i6ut1ONncEyY59XiqM6sZIAcoJ3xYZl/9KnNAWCKJLiyUUCAdZjbFxwn+7R2XjId2TUNCj8o5BD6/63L4DniKDkxBb5Pe3Hh4GTxrIMzunnOPiF8ZCwHcZ63M/N8qyB7NwnnG7tmcqOeeO4bCnFtrgdl0UeI2PVVA= 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=s88tBTSqJ5MOZWSSFMmW7xWNVB8Fz3Id8GFBXiMyq4NM1wLSE63aC2eP56dkJyl6VlgnxSkVUp8PaWtVeGtHnnvW/gK9+5V4Pt7PBGMK0f6c/3DWLS/tMmvWLZ6p5E+VjQH+vFKcVA2tWLZh2sEk0Smz0alQstDd2KW5TbHt4YU=; Message-ID: <22285.35517.qm@web113713.mail.gq1.yahoo.com> X-YMail-OSG: 9vwxLnIVM1k0mnbomSLuXJ45BrYsOBjR2YOzrUOM.pVmf7P RyaB_fPsUtl48ll4zoN0XfuyHq8oWK0DeQyRnmP8mmNAAnFQv1TK5sRww1l2 KGZNP_KGjd4RveIWAV_FUYs5koKhLeAoIJ4oeimvaZJQ8ADvWJujNdh5EDy1 X0iG3OjluFrNfPaKQZoHJR1cXj8_z_kF5dTPETU89WigJqWQfZvvVwrHPJfY Df.VbrIitAmNfKsJRbELWMuN9Gnpo5FvGdt4ufIprqVTGEXEYftT0mrtUNpm IJ2EfrCqr_P6C Received: from [75.162.19.102] by web113713.mail.gq1.yahoo.com via HTTP; Mon, 22 Mar 2010 18:20:57 PDT X-Mailer: YahooMailRC/324.3 YahooMailWebService/0.8.100.260964 Date: Mon, 22 Mar 2010 18:20:57 -0700 (PDT) From: Neil Stlyz Subject: string functions and operators To: pgsql-novice@postgresql.org, pgsql-general@postgresql.org, pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-622454967-1269307257=:35517" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.091 tagged_above=-10 required=5 tests=AWL=0.093, BAYES_40=-0.185, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201003/816 X-Sequence-Number: 160809 --0-622454967-1269307257=:35517 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hello, =0A=0AI have a dilema and I was hoping someone here may offer guidan= ce or assistance. I bet this is a very simple question for someone out ther= e but I am having problems coming up with a solution. Here it is...=0A=0Asu= ppose I have a field with the following values:=0A=0A77.1=0A77.2=0A134.1=0A= 134.2=0A134.3=0A5.1=0A5.2=0A=0AI need two seperate SELECT queries. One woul= d return the following values (everything left of the decimal point)=0A=0A7= 7=0A77=0A134=0A134=0A5=0A5=0A=0AThe second query would return all of the va= lues to the right of the decimal point:=0A=0A1=0A2=0A1=0A2=0A3=0A1=0A2=0A= =0A=0ANow, I have been using the following information (although very Greek= ) to try to solve this problem:=0A=0Ahttp://www.postgresql.org/docs/current= /static/functions-string.html=0A=0AAnd I have been playing around with the = syntax of the following:=0A=0A=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 substring('112.= 5' from '%#"___.#"_' for '#')=0A=0Abut the aforementioned is not quite work= ing out... can someone please=A0show me a string function=A0that will produ= ce the desired results?=0A=0AThanks!=0A~n=0A=0A=0A=0A --0-622454967-1269307257=:35517 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Hello,
=0A
 
=0A
I have a dile= ma and I was hoping someone here may offer guidance or assistance. I bet th= is is a very simple question for someone out there but I am having problems= coming up with a solution. Here it is...
=0A
 
=0A
= suppose I have a field with the following values:
=0A
 
= =0A
77.1
=0A
77.2
=0A
134.1
=0A
134.2
= =0A
134.3
=0A
5.1
=0A
5.2
=0A
 
= =0A
I need two seperate SELECT queries. One would return the following = values (everything left of the decimal point)
=0A
 
=0A<= DIV>77
=0A
77
=0A
134
=0A
134
=0A
5=0A
5
=0A
 
=0A
The second query would return = all of the values to the right of the decimal point:
=0A
 =0A
1
=0A
2
=0A
1
2
=0A
3
=0A1
=0A
2
=0A
 
=0A
 
=0A
Now,= I have been using the following information (although very Greek) to try t= o solve this problem:
=0A
 
=0A=0A
 = ;
=0A
And I have been playing around with the syntax of the follow= ing:
=0A
 
=0A
       =     substring('112.5' from '%#"___.#"_' for '#')
=0A 
=0A
but the aforementioned is not quite working out... c= an someone please show me a string function that will produce the= desired results?
=0A
 
=0A
Thanks!
=0A
~n<= /DIV>=0A
 

=0A=0A --0-622454967-1269307257=:35517--