Re: Copy Data Question - Mailing list pgsql-novice

From
Subject Re: Copy Data Question
Date
Msg-id 20060623235306.2736.qmail@web33309.mail.mud.yahoo.com
Whole thread Raw
In response to Re: Copy Data Question  (Richard Broersma Jr <rabroersma@yahoo.com>)
List pgsql-novice
> 3. select into destinationtable from temptable where
> temptable.primarykey not exists
> ( select destinationtable.primarykey
>    from destination table
> );

Richard,

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 =
t_product.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
exists.

that leaves me needing to combine t_products and
t_select_into_output_table.

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
http://mail.yahoo.com

pgsql-novice by date:

Previous
From:
Date:
Subject: Re: Copy Data Question - SOLVED
Next
From:
Date:
Subject: Re: Copy Data Question