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

Re: Copy Data Question

From: baa(at)brucealderman(dot)info
To: operationsengineer1(at)yahoo(dot)com, pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Copy Data Question
Date: 2006-06-23 17:27:56
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
<DIV name="wmMessageComp"><BR></DIV>
blue 2px solid" name="wmMessageComp">
<div>&gt; 3. select into destinationtable from temptable where<BR>&gt;
temptable.primarykey not exists<BR>&gt; ( select
destinationtable.primarykey<BR>&gt; &nbsp; &nbsp;from destination
table<BR>&gt; ); &nbsp;<BR><BR>Richard, thanks. &nbsp;in my case, the
primary key isn't<BR>relevant, however, the product_number is (it
is<BR>unique). &nbsp;iiuc, in my case i should use
product_number<BR>instead of primarykey.<BR><BR>it makes sense - thanks
for the enlightenment.</div></BLOCKQUOTE>
<P name="wmMessageComp">(slightly off topic) You might consider changing
your table structure so product_number is your primary key, if it always
unique. That way you don't need an additional primary key field. Just a
<P name="wmMessageComp">&nbsp;</P>

Attachment: unknown_filename
Description: text/html (902 bytes)

pgsql-novice by date

Next:From: operationsengineer1Date: 2006-06-23 19:28:42
Subject: Re: Copy Data Question
Previous:From: Tom LaneDate: 2006-06-23 00:11:07
Subject: Re: Copy Data Question

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