From: Emi Lu <emilu@encs.concordia.ca>
To: PostgreSQL SQL List <pgsql-sql@postgresql.org>
Subject: ibatis with overlaps query
Date: Thu, 02 Apr 2009 10:01:53 -0400
Message-ID: <49D4C551.3030702@encs.concordia.ca> (raw)
Good morning,
With ibatis, do overlap checking:
(1) select (DATE #begin_date#, DATE #end_date#) overlaps
(DATE '2008-01-01', DATE '2009-01-01')
. #begin_date# is varchar
. #end_date# is varchar
Always get:
============
Cause: java.sql.SQLException: ERROR: syntax error at or near "$4"
However, when I updated the query to
(2) select (#begin_date#::DATE, #end_date#::DATE) overlaps
(DATE '2008-01-01', DATE '2009-01-01')
It works. I am bit confused why (1) does not work, but (2) does?
--
Lu Ying
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-sql@postgresql.org
Cc: emilu@encs.concordia.ca
Subject: Re: ibatis with overlaps query
In-Reply-To: <49D4C551.3030702@encs.concordia.ca>
* 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