Subject | RE: [Firebird-Java] RE: Exception in preparestatement |
---|---|
Author | Prabhakar Krishnaswami |
Post date | 2004-03-31T15:49:24Z |
What we found last night was that we modified the statement to read as
below:
String sql = "Select distinct(universal_id), max(descr) descr from
aspect where aspect_num between ? and ? and secondary_only=0 group by
universal_id,descr order by descr";
Then the prepare statement worked. It had to do with group by and order
by clauses. BTW, the statement that I had originally given in my
previous email worked in windows but in Linux
Prabhakar Krishnaswami
Software Engineer
Dynix
pkrishnaswami@...
p 801-223-5817
f 801-223-5202
www.dynix.com
-----Original Message-----
From: Niki Ivanchev [mailto:niki_iv@...]
Sent: Wednesday, March 31, 2004 3:02 AM
To: Firebird-Java@yahoogroups.com
Subject: Re: [Firebird-Java] RE: Exception in preparestatement
Luca is right, the error is
arithmetic exception, numeric overflow, or string truncation
Luca Lafranchi wrote:
Yahoo! Groups Links
below:
String sql = "Select distinct(universal_id), max(descr) descr from
aspect where aspect_num between ? and ? and secondary_only=0 group by
universal_id,descr order by descr";
Then the prepare statement worked. It had to do with group by and order
by clauses. BTW, the statement that I had originally given in my
previous email worked in windows but in Linux
Prabhakar Krishnaswami
Software Engineer
Dynix
pkrishnaswami@...
p 801-223-5817
f 801-223-5202
www.dynix.com
-----Original Message-----
From: Niki Ivanchev [mailto:niki_iv@...]
Sent: Wednesday, March 31, 2004 3:02 AM
To: Firebird-Java@yahoogroups.com
Subject: Re: [Firebird-Java] RE: Exception in preparestatement
Luca is right, the error is
arithmetic exception, numeric overflow, or string truncation
Luca Lafranchi wrote:
>Hi :)[Non-text portions of this message have been removed]
>
>
>
>>String sql = "Select distinct(universal_id), max(descr) descr from
>>aspect where aspect_num between ? and ? and secondary_only=0 group by
>>universal_id order by descr";
>>
>>
>>
>
>
>I may be wrong, but
> "where aspect_num between ? and ?"
> doesn't sound like a right syntax to me.
>Try
> "where aspect_num>=? and aspect_num<=?"
>
>Ciao
>Luca
>
>
>
>
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
Yahoo! Groups Links