Re: Re: [SQL] Re: SQL Join - MySQL/PostgreSQL difference? - Mailing list pgsql-general

From Brice Ruth
Subject Re: Re: [SQL] Re: SQL Join - MySQL/PostgreSQL difference?
Date
Msg-id 3A81849B.F6B74E8@webprojkt.com
Whole thread Raw
In response to Re: Re: [SQL] Re: SQL Join - MySQL/PostgreSQL difference?  ("Brett W. McCoy" <bmccoy@chapelperilous.net>)
List pgsql-general
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/

pgsql-general by date:

Previous
From: Crispin Miller
Date:
Subject: Re: Not using index
Next
From: Stephan Szabo
Date:
Subject: Re: drop check constraint