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: 20060623102756.4faf1f2cdfde98ff7024e0f6158a39e4.16c853b673.wbe@email.secureserver.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

<DIV name="wmMessageComp"><BR></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 8px; MARGIN-LEFT: 8px; BORDER-LEFT:
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
suggestion.</P>
<P name="wmMessageComp">&nbsp;</P>

Attachment Content-Type Size
unknown_filename text/html 902 bytes

Browse pgsql-novice by date

  From Date Subject
Next Message operationsengineer1 2006-06-23 19:28:42 Re: Copy Data Question
Previous Message Tom Lane 2006-06-23 00:11:07 Re: Copy Data Question