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: 20060623102756.4faf1f2cdfde98ff7024e0f6158a39e4.16c853b673.wbe@email.secureserver.net (view raw or flat)
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: 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-2014 The PostgreSQL Global Development Group