From: Brice Ruth <brice@webprojkt.com>
To: Brett W. McCoy <bmccoy@chapelperilous.net>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Fork <mfork@toledolink.com>
Cc: Ian Harding <iharding@pakrat.com>
Cc: pgsql-general@postgresql.org
Cc: pgsql-sql@postgresql.org
Subject: Re: Re: [SQL] Re: SQL Join - MySQL/PostgreSQL difference?
Date: Wed, 07 Feb 2001 11:23:37 -0600
Message-ID: <3A81849B.F6B74E8@webprojkt.com> (raw)
References: <Pine.LNX.4.30.0102071157540.14692-100000@chapelperilous.net>
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' <filename>
>
> 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/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: brice@webprojkt.com, bmccoy@chapelperilous.net, tgl@sss.pgh.pa.us, mfork@toledolink.com, iharding@pakrat.com, pgsql-general@postgresql.org
Subject: Re: [SQL] Re: SQL Join - MySQL/PostgreSQL difference?
In-Reply-To: <3A81849B.F6B74E8@webprojkt.com>
References: <Pine.LNX.4.30.0102071157540.14692-100000@chapelperilous.net> <3A81849B.F6B74E8@webprojkt.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox