Re: string functions and operators

Поиск
Список
Период
Сортировка
От Petru Ghita
Тема Re: string functions and operators
Дата
Msg-id 4BA81E52.9090200@venaver.info
обсуждение исходный текст
Ответ на string functions and operators  (Neil Stlyz <neilstylz@yahoo.com>)
Ответы Re: string functions and operators  (Petru Ghita <petrutz@venaver.info>)
Список pgsql-sql
-----BEGIN PGP SIGNED MESSAGE----- <br /> Hash: SHA1 <br />  <br /> That field of yours... what type is it?<br /> Is
itTEXT? is it a numeric type?<br /> If it's TEXT, why don't you make it say... NUMERIC(/10/, /6///)?<br /><br /><a
class="moz-txt-link-freetext"
href="http://www.postgresql.org/docs/8.4/interactive/datatype-numeric.html#DATATYPE-NUMERIC-DECIMAL">http://www.postgresql.org/docs/8.4/interactive/datatype-numeric.html#DATATYPE-NUMERIC-DECIMAL</a><br
/><br/><br /> On 23/03/2010 2:20, Neil Stlyz wrote:<br /><span style="white-space: pre;">> Hello,<br /> > <br />
>I have a dilema and I was hoping someone here may offer guidance<br /> > or assistance. I bet this is a very
simplequestion for someone<br /> > out there but I am having problems coming up with a solution. Here<br /> > it
is...<br/> > <br /> > suppose I have a field with the following values:<br /> > <br /> > 77.1 77.2 134.1
134.2134.3 5.1 5.2<br /> > <br /> > I need two seperate SELECT queries. One would return the following <br />
>values (everything left of the decimal point)<br /> > <br /> > 77 77 134 134 5 5<br /> > <br /> > The
secondquery would return all of the values to the right of<br /> > the decimal point:<br /> > <br /> > 1 2 1 2
31 2<br /> > <br /> > <br /> > Now, I have been using the following information (although very <br /> >
Greek)to try to solve this problem:<br /> > <br /> > <a class="moz-txt-link-freetext"
href="http://www.postgresql.org/docs/current/static/functions-string.html">http://www.postgresql.org/docs/current/static/functions-string.html</a><br
/>><br /> >  And I have been playing around with the syntax of the following:<br /> > <br /> >
substring('112.5'from '%#"___.#"_' for '#')<br /> > <br /> > but the aforementioned is not quite working out...
cansomeone <br /> > please show me a string function that will produce the desired<br /> > results?<br /> >
<br/> > Thanks! ~n<br /> > <br /> > </span><br /> -----BEGIN PGP SIGNATURE----- <br /> Version: GnuPG v1.4.9
(MingW32)<br /> Comment: Using GnuPG with Mozilla - <a class="moz-txt-link-freetext"
href="http://enigmail.mozdev.org/">http://enigmail.mozdev.org/</a><br/>  <br />
iEYEARECAAYFAkuoHlIACgkQt6IL6XzynQTJ/ACfX4mSteAz9CmZLnPCayz+jXQI<br /> IhoAnA7qrFHNmRVObfSvE+YXZ0OKr3MS <br /> =wvB9
<br/> -----END PGP SIGNATURE----- <br /><br /> 

В списке pgsql-sql по дате отправления:

Предыдущее
От: Neil Stlyz
Дата:
Сообщение: string functions and operators
Следующее
От: Petru Ghita
Дата:
Сообщение: Re: string functions and operators