Received: from morpheus.webprojkt.com (morpheus.webprojkt.com [209.61.155.148]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f17HNex80410 for ; Wed, 7 Feb 2001 12:23:40 -0500 (EST) (envelope-from brice@webprojkt.com) Received: (qmail 30324 invoked by uid 604); 7 Feb 2001 17:23:39 -0000 Received: from unknown (HELO webprojkt.com) (216.170.131.123) by morpheus.webprojkt.com with SMTP; 7 Feb 2001 17:23:39 -0000 Message-ID: <3A81849B.F6B74E8@webprojkt.com> Date: Wed, 07 Feb 2001 11:23:37 -0600 From: Brice Ruth X-Mailer: Mozilla 4.76 (Macintosh; U; PPC) X-Accept-Language: en MIME-Version: 1.0 To: "Brett W. McCoy" CC: Tom Lane , Michael Fork , Ian Harding , pgsql-general@postgresql.org, pgsql-sql@postgresql.org Subject: Re: Re: [SQL] Re: SQL Join - MySQL/PostgreSQL difference? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200102/346 X-Sequence-Number: 4220 I believe the cr/lf was the problem. I reran the original query: SELECT tblFDBMono.SequenceNumber, tblFDBMono.SectionCode, tblFDBMono.LineText FROM tblPEMDrugLink, tblFDBMono WHERE (tblPEMDrugLink.MonographId = tblFDBMono.MonographId) AND (VersionId = 'FDB-PE') AND (Category = 'PEM') AND (tblPEMDrugLink.DrugId = 'DG-5039') ORDER BY tblFDBMono.SequenceNumber And was returned the results I expected. Sweetness. Damned stupid that it took me this long to figure this out ... I have the PostgreSQL book, but I must have missed the section where it talked about COPY ... FROM only taking the LF and leaving the CR. I knew the files were exported in 'DOS' format (according to vi) ... and in the back of my mind I thought that could screw things up. Hrmpf. At least I got it figured out. Thanx a ton, guys. "Brett W. McCoy" wrote: > > On Wed, 7 Feb 2001, Brice Ruth wrote: > > > Is there a simple (unix) command I can run on text files to convert > > cr/lf to lf? The way I did it seemed pretty ass-backward to me (not to > > mention time consuming). > > perl -pi -e 's/\cM\\g' > > will do the trick, assuming you have Perl instaleld on your system. > > -- Brett > http://www.chapelperilous.net/~bmccoy/ > --------------------------------------------------------------------------- > Money will say more in one moment than the most eloquent lover can in years. -- Brice Ruth WebProjkt, Inc. VP, Director of Internet Technology http://www.webprojkt.com/