Skip site navigation (1) Skip section navigation (2)

Re: Copy Data Question

From: <operationsengineer1(at)yahoo(dot)com>
To: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: Copy Data Question
Date: 2006-06-23 23:53:06
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
> 3. select into destinationtable from temptable where
> temptable.primarykey not exists
> ( select destinationtable.primarykey
>    from destination table
> );  


thanks for the lead...

this worked...

select product_number, product_name,
product_description, quality_standard,
product_entry_date --into t_product
from t_temp
where not exists
  ( select product_number
   from t_product
   where t_temp.product_number =

i did have to add a where clause in the subselect to
get what i was after.

"select into" appears to work only with a new table.

iow i can't select into t_product since it already

that leaves me needing to combine t_products and

any ideas?

ps - maybe select into can work with existing tables,
but i don't know how.

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

In response to

pgsql-novice by date

Next:From: operationsengineer1Date: 2006-06-24 00:03:50
Subject: Re: Copy Data Question
Previous:From: operationsengineer1Date: 2006-06-23 22:52:22
Subject: Re: Copy Data Question - SOLVED

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group