Fw: Problem when used union with differents column legth

Поиск
Список
Период
Сортировка
От Milton
Тема Fw: Problem when used union with differents column legth
Дата
Msg-id 002901c615e7$90819d40$24000aaa@mapcardoso.com.br
обсуждение исходный текст
Ответы Re: Fw: Problem when used union with differents column legth  (Ludek Finstrle <luf@pzkagis.cz>)
Список pgsql-odbc
 
Execute the script:
--------------------------------------------------------
CREATE TABLE A(
 COL VARCHAR(3)
);
 
CREATE TABLE B(
 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...

 

 

В списке pgsql-odbc по дате отправления:

Предыдущее
От:
Дата:
Сообщение: [ psqlodbc-Bugs-1000510 ] Access the rdoResultset´s column is NULL in the second access
Следующее
От:
Дата:
Сообщение: [ psqlodbc-Bugs-1000509 ] TextAsLongVarchar=0 don't work