Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Need help with this query.

Re: Need help with this query.

From: Mladen Gogala <mgogala_at_earthlink.net>
Date: Wed, 23 Jan 2002 07:48:27 GMT
Message-ID: <pan.2002.01.23.02.48.25.979737.1171@earthlink.net>


On Tue, 22 Jan 2002 23:58:12 -0500, Kev wrote:

> Ok,
>
> I dont get this at all.
>
> Platform oracle 8i;
>
> From the SQL Plus I run this query and it works with no problem;
>
> select DATA_ID, DATAPOINT_ID, SHORTDATE, INTERVAL, VALUE, typeofday from
> vw_Andy
> where DATAPOINT_ID = 1
> and (SHORTDATE >= '01-JAN-02' and SHORTDATE < '30-JAN-02')
> order by shortdate, interval
>
> But now if I run this exact same query cut and paste in into VB, Delphi,
> C++ it will not work. It returns nothing.
>
> I am using ADO. I have no clue as to what is going on. Does anyone have
> a clue?
>
> any other query I run from VB, Delphi, C++ without using a date I have no
> problems whatsoever. Just when I add a date it doesnt work. I dont get
> it.
>
> Thanks,
>
> Kev

That is the tool problem, not the query problem. In my opinion (I am a Unix guy, my favorite IDE is called "vi") you are encountirng a data conversion problem. The tool is "smart" and converts the column ("SHORTDATE") into VARCHAR2 instead of converting the constant expressions. You should try with TO_DATE() explicite conversion. Received on Wed Jan 23 2002 - 01:48:27 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US