<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forum PostgreSQL - UPDATE z tabeli1 do tabeli2]]></title>
	<link rel="self" href="http://forum.postgresql.org.pl/extern.php?action=feed&amp;tid=551&amp;type=atom"/>
	<updated>2011-03-02T18:21:46Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.postgresql.org.pl/viewtopic.php?id=551</id>
		<entry>
			<title type="html"><![CDATA[Odp: UPDATE z tabeli1 do tabeli2]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=2410#p2410"/>
			<content type="html"><![CDATA[To chyba powinno być coś w stylu
[code]
UPDATE
     ts_users,
SET
     ts_users.lastvisit = tt_sessions.session_time
FROM  tt_sessions
WHERE
     ts_users.idpk_user=tt_sessions.session_user_idfk 
[/code]]]></content>
			<author>
				<name><![CDATA[rski]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=26</uri>
			</author>
			<updated>2011-03-02T18:21:46Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=2410#p2410</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[UPDATE z tabeli1 do tabeli2]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=2408#p2408"/>
			<content type="html"><![CDATA[przerabiam na format odpowiedni dla pg zapytanie którego zadaniem jest uaktualnienie danych z jednej tabeli do drugiej [code]
UPDATE
     ts_users,
     tt_sessions
SET
     ts_users.lastvisit = tt_sessions.session_time
WHERE
     ts_users.idpk_user=tt_sessions.session_user_idfk 
[/code]
dostaję błąd związany z przecinkiem po ts_users czyli deklaracją dwóch tabel jednocześnie
[code]ERROR: syntax error at or near "," [/code]
to jest podobno standardowe zapytanie SQL-a i trochę mi nie pasuje, ze w pg nie mogę tego zrobić]]></content>
			<author>
				<name><![CDATA[WitekS]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=760</uri>
			</author>
			<updated>2011-03-01T11:19:47Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=2408#p2408</id>
		</entry>
</feed>
