If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > odbc and 'order by'

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-07-05, 07:02
supinformix supinformix is offline
Registered User
 
Join Date: Apr 2004
Location: Brussels
Posts: 57
odbc and 'order by'

A select with 'group by' from MS-Access to linked table in informix generated error -309.
The select is : "select a, b from tab1 group by a"
When tracing the odbc (by odbc manager) it seems that Access first try to get the index : "select indx from tab1 group by a;" and this generate error -309 in Informix 7.31
MS-Access 2003, XP, ODBC 3.82.0.2.81.TC1, IDS 7.31

Have someone a solution for this problem ?
Thanks a lot for help.
__________________
Yves & Willy
Reply With Quote
  #2 (permalink)  
Old 03-07-05, 13:16
RobP RobP is offline
Registered User
 
Join Date: Mar 2004
Location: Netherlands
Posts: 183
Hi,

I've nort checked the error message but normally in Informix you cannot select 2 columsn on which only one column is grouped. To bypass this limitation you have two solutions:
select a, b from x group by a,b or
select a, max(b) from x group by a

In the second solution you need to use an aggregate function. Normally this should do the trick.

Greetz,

Rob
Reply With Quote
  #3 (permalink)  
Old 03-07-05, 13:59
supinformix supinformix is offline
Registered User
 
Join Date: Apr 2004
Location: Brussels
Posts: 57
Sorry, you are right,
I mismake my question, my question must be about 'order by' and not 'group by' :

The select statement is
A select with 'ORDER BY' from MS-Access to a linked table in informix generates error -309.
The select is : "select a, b from tab1 ORDER BY a"
When tracing the odbc (by odbc manager) it seems that Access first try to get the index : "select indx from tab1 ORDER BY a;" and this generate error -309 in Informix 7.31
MS-Access 2003, XP, ODBC 3.82.0.2.81.TC1, IDS 7.31

Have someone a solution for this problem ?
Thanks a lot for help.
__________________
Yves & Willy
__________________
Yves & Willy
Reply With Quote
  #4 (permalink)  
Old 03-10-05, 02:48
supinformix supinformix is offline
Registered User
 
Join Date: Apr 2004
Location: Brussels
Posts: 57
solution :
-migrate to ids9.40
or
- use old odbc driver
or
- call IBM support and convince them of these errors with trace

I'm lazy and will use old odbc driver until migration
__________________
Yves & Willy
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On