<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Forum PostgreSQL - Pobieranie z jednego pola]]></title>
		<link>https://forum.postgresql.org.pl/viewtopic.php?id=1338</link>
		<description><![CDATA[Najświeższe odpowiedzi w Pobieranie z jednego pola.]]></description>
		<lastBuildDate>Thu, 17 May 2012 13:18:01 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Odp: Pobieranie z jednego pola]]></title>
			<link>https://forum.postgresql.org.pl/viewtopic.php?pid=3609#p3609</link>
			<description><![CDATA[Dzięki poradziłem sobie inaczej:

[code]
SELECT tabela.ID, temp1.KOD, temp2.KOD
FROM slownik AS temp1,
   slownik AS temp2
WHERE
temp1.KOD = tabela.dane_1 AND
temp2.KOD = tabela.dane_2
[/code]

Dzięki za odpowiedzi.]]></description>
			<author><![CDATA[dummy@example.com (lasoty)]]></author>
			<pubDate>Thu, 17 May 2012 13:18:01 +0000</pubDate>
			<guid>https://forum.postgresql.org.pl/viewtopic.php?pid=3609#p3609</guid>
		</item>
		<item>
			<title><![CDATA[Odp: Pobieranie z jednego pola]]></title>
			<link>https://forum.postgresql.org.pl/viewtopic.php?pid=3605#p3605</link>
			<description><![CDATA[lub tak gdy dana_1 lub dana_2 będą przechowywały wartość null
Select t1.dane_1,(select kod from slownik where id= t1.dane_1) as kod_1 ,t1.dane_2,(select kod from slownik where id= t1.dane_2) as kod_2
from tabela t1]]></description>
			<author><![CDATA[dummy@example.com (c_michal)]]></author>
			<pubDate>Wed, 16 May 2012 10:59:06 +0000</pubDate>
			<guid>https://forum.postgresql.org.pl/viewtopic.php?pid=3605#p3605</guid>
		</item>
		<item>
			<title><![CDATA[Odp: Pobieranie z jednego pola]]></title>
			<link>https://forum.postgresql.org.pl/viewtopic.php?pid=3604#p3604</link>
			<description><![CDATA[O takie cusik chodziło ??

Select t1.dane_1,s1.kod,t1.dane_2,s2.kod
from tabela t1
join slownik s1 on s1.id = t1.dane_1
join slownik s2 on s2.id = t1.dane_2;]]></description>
			<author><![CDATA[dummy@example.com (adamleon)]]></author>
			<pubDate>Wed, 16 May 2012 05:21:25 +0000</pubDate>
			<guid>https://forum.postgresql.org.pl/viewtopic.php?pid=3604#p3604</guid>
		</item>
		<item>
			<title><![CDATA[Pobieranie z jednego pola]]></title>
			<link>https://forum.postgresql.org.pl/viewtopic.php?pid=3603#p3603</link>
			<description><![CDATA[Witam, mam dwie tabele:

[code]
+-----------+
|  tabela   |
+-----------+
|  ID       |
+-----------+
| dane_1    |
+-----------+
| dane_2    |
+-----------+

-----------------------------
+-----------+
|  slownik  |
+-----------+
|  ID       |
+-----------+
| KOD       |
+-----------+
| opis      |
+-----------+
[/code]

Problem polega na tym, że pola dane_1 oraz dane_2 odnoszą się do pola slownik.ID. Jak powinno wyglądać zapytanie aby poprawnie wyświetlić wartość pola slownik.KOD do którego odnoszą się wspomniane pola?]]></description>
			<author><![CDATA[dummy@example.com (lasoty)]]></author>
			<pubDate>Tue, 15 May 2012 22:14:20 +0000</pubDate>
			<guid>https://forum.postgresql.org.pl/viewtopic.php?pid=3603#p3603</guid>
		</item>
	</channel>
</rss>
