Tables:
CREATE TABLE dok ( dokumnr NUMERIC(12),
CONSTRAINT dok_pkey PRIMARY KEY (dokumnr) );
CREATE TABLE rid ( dokumnr NUMERIC(12) );
CREATE INDEX rid_dokumnr_idx ON rid (dokumnr);
Query:
SELECT dokumnr FROM rid WHERE dokumnr NOT IN
(select dokumnr FROM dok);
runs VERY slowly in Po
> Andrus Moor wrote:
>> I have item table and a lot of child tables where the items are used.
>> I want to merge two item codes into single item in all tables.
>> It is not nice to write a lot of separate UPDATE statements for each
>> table.
>> So I want to util
I have item table and a lot of child tables where the items are used.
I want to merge two item codes into single item in all tables.
It is not nice to write a lot of separate UPDATE statements for each table.
So I want to utilize REFERENCES clause for merging.
I tried the following code but got du
I want to nullify fields which does not exist in reference table.
I tried
UPDATE demo.toode
SET "liik"=NULL,"grupp"=NULL
WHERE ("grupp","liik") NOT IN
(SELECT ("grupp", "liik") FROM "artliik")
but this causes error:
ERROR: operator d
I want to implement a multi-company database where each schema represents
different company.
I created a number of schemas in a database.
How to select a list of schema names which current user is authorized to
access ?
I want to get the list of companies to allow user pick the one.
---