Fw: Problem when used union with differents column legth
Fw: Problem when used union with differents column legth
От:
"Milton" <milton.siqueira@mapcardoso.com.br>
Дата:
Execute the script:
--------------------------------------------------------
CREATE TABLE A(
COL VARCHAR(3)
);
COL VARCHAR(3)
);
CREATE TABLE B(
COL VARCHAR(6)
);
COL VARCHAR(6)
);
INSERT INTO A VALUES ('T1');
INSERT INTO A VALUES ('T2');
INSERT INTO A VALUES ('T3');
INSERT INTO B VALUES ('T4');
INSERT INTO B VALUES ('T5');
INSERT INTO B VALUES ('T6');
--------------------------------------------------------
The result of the sql: SELECT COL FROM A UNION SELECT COL FROM B
COL
---------
T1
T2
T3
T4
T5
T6
But when i use rdoResultset(DAO), the result is:
COL
-----------
T1
T1
T1
T1
T1
T1
Now i use the sql "SELECT COL::varchar(6) FROM A UNION SELECT COL FROM B"
with rdoresultset i have the positive result:
COL
---------
T1
T2
T3
T4
T5
T6
In the others db´s drive it work...
I read the data with rdoResultset like this:
===========================
set rdoQuery = connection.OpenResultset("SELECT COL FROM A UNION SELECT COL FROM B
", rdOpenKeyset, rdConcurReadOnly)
do while rdoQuery.EOF
Debug.print(rdoQuery!Col)
rdoQuery.MoveNext
loop
============================
Thanks...
Re: Fw: Problem when used union with differents column legth
> But when i use rdoResultset(DAO), the result is: > > COL > ----------- > T1 > T1 > T1 > T1 > T1 > T1 There is a problem in PGAPI_SetPos function. Please try this patch which solve the problem. Patch attached. Please test review and comment Luf