<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forum PostgreSQL - Wyświetlenie części zawartości pola]]></title>
	<link rel="self" href="http://forum.postgresql.org.pl/extern.php?action=feed&amp;tid=1339&amp;type=atom"/>
	<updated>2012-05-17T20:16:53Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.postgresql.org.pl/viewtopic.php?id=1339</id>
		<entry>
			<title type="html"><![CDATA[Odp: Wyświetlenie części zawartości pola]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=3610#p3610"/>
			<content type="html"><![CDATA[zobacz tu [url]http://www.postgresql.org/docs/9.1/static/functions-string.html[/url] (dużo funkcji jest tylko w wersji 9) lub zobacz przykład 
select substring(d.pole from 1 for 4),
       substring(d.pole from 1 for position('/' in d.pole)-1), 
       substr(d.pole, 1, 4),
       substr(d.pole,1,strpos(d.pole, '/')-1),
       split_part(d.pole,'/',1)
from (select '2011/000002'::text as pole) d
masz jeszcze do wyboru wyrażenia regularne i funkcje rozdzielające text na tablice i pewnie jeszcze coś się znajdzie]]></content>
			<author>
				<name><![CDATA[c_michal]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=627</uri>
			</author>
			<updated>2012-05-17T20:16:53Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=3610#p3610</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Wyświetlenie części zawartości pola]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=3607#p3607"/>
			<content type="html"><![CDATA[Witam ponownie. Mam pole, którego zawartość przedstawia się mniej więcej tak:

[code]
+-----------+
|  POLE     |
+-----------+
|2011/000002|
+-----------+
[/code]

Jak wyświetlić wszystkie wiersze tego pola, ale tylko "2011" (w założeniu tylko 4 pierwsze litery)?]]></content>
			<author>
				<name><![CDATA[lasoty]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=1424</uri>
			</author>
			<updated>2012-05-17T13:12:40Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=3607#p3607</id>
		</entry>
</feed>
