Novice needs help - Mailing list pgsql-sql

From Terry Lee Tucker
Subject Novice needs help
Date
Msg-id 3E6E2139.5060903@esc1.com
Whole thread Raw
Responses Re: Novice needs help  (Joe Conway <mail@joeconway.com>)
Re: Novice needs help  (jasiek@klaster.net)
List pgsql-sql
I have loaded over 29,000 customer records into a database. I'm trying 
to apply a referential foreign key that validates the country code and 
the province code in another table. It won't work because somewhere in 
that 29,000 records there is a province code or country code that 
doesn't match. Is there a way to use a select statement to find out 
which customer records has the invalid data? Here is the partial table 
layout:

cust                                                            province
--------                                                 -------
country                      ===>                       country
province                    ===>                       code

Thanks in advance...

-- 
Terry Lee Tucker





pgsql-sql by date:

Previous
From: Andreas Pflug
Date:
Subject: Re: How to notice column changes in trigger
Next
From: Terry Lee Tucker
Date:
Subject: Re: Novice needs help