<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forum PostgreSQL - z SELECT do CREATE TABLE, UPDATE]]></title>
	<link rel="self" href="http://forum.postgresql.org.pl/extern.php?action=feed&amp;tid=1884&amp;type=atom"/>
	<updated>2013-09-08T15:05:33Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.postgresql.org.pl/viewtopic.php?id=1884</id>
		<entry>
			<title type="html"><![CDATA[Odp: z SELECT do CREATE TABLE, UPDATE]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=4697#p4697"/>
			<content type="html"><![CDATA[[quote=STRATOLINER]znowu mam...

create table www_temp WITH (OIDS) AS
select imie, nazwisko, nazwatowaru, stan from klienci where nazwisko='kowalski' where stan<>'0'[/quote]

*nigdy* nie używaj oid'ów.

Nie wiem co chciałeś uzyskać, ale oidy nie są rozwiązaniem dla żadnego realnego problemu.]]></content>
			<author>
				<name><![CDATA[depesz]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=1564</uri>
			</author>
			<updated>2013-09-08T15:05:33Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=4697#p4697</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: z SELECT do CREATE TABLE, UPDATE]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=4695#p4695"/>
			<content type="html"><![CDATA[a inserta robimy:

insert into www_temp 
select imie, nazwisko, nazwatowaru, stan from klienci where nazwisko='kowalski' where stan<>'0'

o ile tabela juz jest...]]></content>
			<author>
				<name><![CDATA[STRATOLINER]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=1641</uri>
			</author>
			<updated>2013-09-06T07:07:11Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=4695#p4695</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: z SELECT do CREATE TABLE, UPDATE]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=4694#p4694"/>
			<content type="html"><![CDATA[znowu mam...

create table www_temp WITH (OIDS) AS
select imie, nazwisko, nazwatowaru, stan from klienci where nazwisko='kowalski' where stan<>'0']]></content>
			<author>
				<name><![CDATA[STRATOLINER]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=1641</uri>
			</author>
			<updated>2013-09-06T06:56:37Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=4694#p4694</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: z SELECT do CREATE TABLE, UPDATE]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=4693#p4693"/>
			<content type="html"><![CDATA[już mam :)
CREATE TABLE www_temp AS
select imie, nazwisko, nazwatowaru, stan from klienci where nazwisko='kowalski' where stan<>'0'

he he 
ale jeszcze jak zrobić "primary key"?]]></content>
			<author>
				<name><![CDATA[STRATOLINER]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=1641</uri>
			</author>
			<updated>2013-09-06T06:33:55Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=4693#p4693</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[z SELECT do CREATE TABLE, UPDATE]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=4692#p4692"/>
			<content type="html"><![CDATA[Witam.
poszukuje sposobu utworzenia lub aktualizacji tabeli z wcześniej wykonanego select-a.

mam np:

select imie, nazwisko, nazwatowaru, stan from klienci where nazwisko='kowalski' where stan<>'0'

Po tym wyświetla mi się tabela z X rekordami. Tą całą tabelę chcę umieścić w bazie jako nową tabelę lub za jej pomocą zaktualizować inną istniejącą tabelę z takimi samymi kolumnami.

Jakiś pomysł?]]></content>
			<author>
				<name><![CDATA[STRATOLINER]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=1641</uri>
			</author>
			<updated>2013-09-06T06:16:05Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=4692#p4692</id>
		</entry>
</feed>
