Re: Re: [SQL] Re: SQL Join - MySQL/PostgreSQL difference?

From: Brice Ruth <brice(at)webprojkt(dot)com>
To: "Brett W(dot) McCoy" <bmccoy(at)chapelperilous(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Michael Fork <mfork(at)toledolink(dot)com>, Ian Harding <iharding(at)pakrat(dot)com>, pgsql-general(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Re: Re: [SQL] Re: SQL Join - MySQL/PostgreSQL difference?
Date: 2001-02-07 17:23:37
Message-ID: 3A81849B.F6B74E8@webprojkt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

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/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2001-02-07 17:33:23 Re: drop check constraint
Previous Message Brett W. McCoy 2001-02-07 16:58:48 Re: Re: [SQL] Re: SQL Join - MySQL/PostgreSQL difference?

Browse pgsql-sql by date

  From Date Subject
Next Message Jeff Eckermann 2001-02-07 18:20:36 Use of RETURN in pl/pgsql function
Previous Message Stephan Szabo 2001-02-07 17:21:12 Re: Is this a bug, or is it just me?