pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mike Mascari <mascarm@mascari.com>
To: pgsql-interfaces@postgresql.org
Subject: Problem with LIKE in Access and ODBC
Date: Mon, 13 Dec 1999 16:29:05 -0500
Message-ID: <38556520.2E306BF@mascari.com> (raw)

Hello,

I was wondering if there's something here I'm not seeing (or am unaware
of) with respect to the use of LIKE in Microsoft Access over ODBC to
PostgreSQL 6.5.0 using the 6.40.00.06 ODBC driver. I have the following
query:

SELECT workorders.workorder, workorders.workorderno, equipment.assetno,
equipment.controlno
FROM workorders, equipment
WHERE equipment.assetno LIKE '%214%' AND
workorders.equipment=equipment.equipment
ORDER BY workorders.workorder;

When I just "copy-and-paste" this query into a psql session, everything
works fine (although if I recall correctly, 6.5.0 has a bug with
something of the form LIKE '214%'). However, the following appears in
the trace log:

MSACCESS        fff8be35:fffa52c5 EXIT  S
QLExecDirect  with return code 0 (SQL_SUCCESS)
  HSTMT               0x057d0b60
  UCHAR *             0x051c1828 [      -3]
"SELECT "workorders"."workorder","equipment"."equipment" FROM
"workorders","equipment" WHERE
(("equipment"."assetno" = '%214%' ) AND
("workorders"."equipment" = "equipment"."equipment" ) )
ORDER BY "workorders"."workorder"  \ 0"
  SDWORD                    -3

MSACCESS        fff8be35:fffa52c5 ENTER SQLFetch
  HSTMT               0x057d0b60

MSACCESS        fff8be35:fffa52c5 EXIT  SQLFetch  with
return code 100 (SQL_NO_DATA_FOUND)
  HSTMT               0x057d0b60

So I'm wondering who's turning my LIKE clause into an equality operator?

Is this a Microsoft Access issue? Is there a method of pattern matching
available that wouldn't require me to use the direct pass-thru method?

Any help would be greatly appreciated,

Mike Mascari




Message-ID: <38556520.2E306BF@mascari.com>
Permalink:  ../38556520.2E306BF@mascari.com/
Also on:    postgresql.org/message-id/38556520.2E306BF@mascari.com

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: mascarm@mascari.com
  Subject: Re: Problem with LIKE in Access and ODBC
  In-Reply-To: <38556520.2E306BF@mascari.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