close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 17 years ago

Last modified 14 years ago

#550 assigned defect

DBTableColumn function does not work

Reported by: Alfredo Torre Owned by: Jorge
Priority: highest Milestone:
Component: Database Version: 1.1.6
Severity: blocker Keywords:
Cc: imendez, Javier Gallardo

Description (last modified by Javier Portugal)

Please, run this TOL code:


Real DBOpen(_DB_, _USER_, _PASS_);
Text Qry =
"
select 'A' as c1, 'X' as c2, 1 as c3 UNION
select 'A', 'Y', 1 UNION
select 'B', 'X', 2 UNION
select 'B', 'Z', 3
order by c1, c2
";
Set XXX01 = DBTable(Qry);
Set XXX02 = DBTableColumn(Qry, 1, 1);

Real DBClose(_DB_)

I think XXX02 Set should be:

Set [[

"", "A", "B" ?, TABLE HEADER
"X", 1 , 2 ?,
"Y", 1 , ? ?,
"Z", ? , 3 ?
]];

I don't know if the first element (TABLE HEADER) should be in the returned Set.

Change History (4)

comment:1 Changed 17 years ago by danirus

Hi Freddy,

Sorry for the delay answering.

I'd be glad to fix this error if I had a comprehensive description of the DBTableColumn expected behavior. As far as I remember this function was never well implemented due to a lack of a suitable specification.

If you were so kind to provide it here or at least start a discussion to define its behavior, we could then go further and get rid of this bug.

The required information should give us a picture of what is required by the function and how each parameter should act alone and in combination with the rest. A complete set of examples will be deeply welcomed.

Looking forward to reading from you.
Thanks in advance for your patience.

D

comment:2 Changed 16 years ago by Víctor de Buen Remiro

Component: SetAlgebraDatabase

comment:3 Changed 16 years ago by Víctor de Buen Remiro

Owner: changed from danirus to Jorge
Status: newassigned

comment:4 Changed 14 years ago by Javier Portugal

Description: modified (diff)

Hola,

Me gustaría que se retome este bug o mejora. En mi caso no es que la función DBTableColumn funcione incorrectamente sino que hace que TOL se caiga.

He intentado aislar el problema para que no haga falta hacer una query a una base de datos concreta. Habría que conectarse a cualquier gestor que tenga la tabla dual para que el ejemplo funcione. Lo estoy probando en la versión 2.0.1 b.0.45 3010-10-20.

Set setClu = DBTableColumn("
select 'C_4' as co_cluster_A, 'C_6' as co_cluster_b, 101025 as qt_individuos from dual union
select 'C_7' as co_cluster_A, 'C_5' as co_cluster_b, 122553 as qt_individuos from dual union
select 'C_3' as co_cluster_A, 'C_5' as co_cluster_b,   1193 as qt_individuos from dual union
select 'C_7' as co_cluster_A, 'C_3' as co_cluster_b,   1334 as qt_individuos from dual union
select 'C_2' as co_cluster_A, 'C_5' as co_cluster_b,    519 as qt_individuos from dual union
select 'C_1' as co_cluster_A, 'C_4' as co_cluster_b,    299 as qt_individuos from dual union
select 'C_5' as co_cluster_A, 'C_1' as co_cluster_b,     86 as qt_individuos from dual union
select 'C_2' as co_cluster_A, 'C_3' as co_cluster_b,     24 as qt_individuos from dual union
select 'C_8' as co_cluster_A, 'C_5' as co_cluster_b,     17 as qt_individuos from dual union
select 'C_1' as co_cluster_A, 'C_5' as co_cluster_b,     92 as qt_individuos from dual union
select 'C_6' as co_cluster_A, 'C_8' as co_cluster_b,     30 as qt_individuos from dual union
select 'C_3' as co_cluster_A, 'C_8' as co_cluster_b,     10 as qt_individuos from dual union
select 'C_6' as co_cluster_A, 'C_2' as co_cluster_b,      3 as qt_individuos from dual union
select 'C_2' as co_cluster_A, 'C_4' as co_cluster_b,     92 as qt_individuos from dual union
select 'C_7' as co_cluster_A, 'C_7' as co_cluster_b,     14 as qt_individuos from dual union
select 'C_1' as co_cluster_A, 'C_3' as co_cluster_b,     42 as qt_individuos from dual union
select 'C_5' as co_cluster_A, 'C_5' as co_cluster_b,     10 as qt_individuos from dual union
select 'C_1' as co_cluster_A, 'C_X' as co_cluster_b,      9 as qt_individuos from dual union
select 'C_1' as co_cluster_A, 'C_2' as co_cluster_b,  52986 as qt_individuos from dual union
select 'C_6' as co_cluster_A, 'C_3' as co_cluster_b,  56423 as qt_individuos from dual union
select 'C_5' as co_cluster_A, 'C_8' as co_cluster_b,   7699 as qt_individuos from dual union
select 'C_5' as co_cluster_A, 'C_4' as co_cluster_b,    177 as qt_individuos from dual union
select 'C_7' as co_cluster_A, 'C_4' as co_cluster_b,    966 as qt_individuos from dual union
select 'C_4' as co_cluster_A, 'C_1' as co_cluster_b,   1359 as qt_individuos from dual union
select 'C_1' as co_cluster_A, 'C_8' as co_cluster_b,     18 as qt_individuos from dual union
select 'C_8' as co_cluster_A, 'C_4' as co_cluster_b,     17 as qt_individuos from dual union
select 'C_7' as co_cluster_A, 'C_X' as co_cluster_b,     19 as qt_individuos from dual union
select 'C_3' as co_cluster_A, 'C_4' as co_cluster_b,  27805 as qt_individuos from dual union
select 'C_4' as co_cluster_A, 'C_2' as co_cluster_b,   5247 as qt_individuos from dual union
select 'C_8' as co_cluster_A, 'C_3' as co_cluster_b,    851 as qt_individuos from dual union
select 'C_4' as co_cluster_A, 'C_3' as co_cluster_b,   2730 as qt_individuos from dual union
select 'C_5' as co_cluster_A, 'C_2' as co_cluster_b,   3199 as qt_individuos from dual union
select 'C_3' as co_cluster_A, 'C_6' as co_cluster_b,   1469 as qt_individuos from dual union
select 'C_1' as co_cluster_A, 'C_1' as co_cluster_b,    843 as qt_individuos from dual union
select 'C_7' as co_cluster_A, 'C_2' as co_cluster_b,     60 as qt_individuos from dual union
select 'C_8' as co_cluster_A, 'C_6' as co_cluster_b,      5 as qt_individuos from dual union
select 'C_2' as co_cluster_A, 'C_X' as co_cluster_b,   8973 as qt_individuos from dual union
select 'C_8' as co_cluster_A, 'C_7' as co_cluster_b,  32699 as qt_individuos from dual union
select 'C_8' as co_cluster_A, 'C_8' as co_cluster_b,   6040 as qt_individuos from dual union
select 'C_2' as co_cluster_A, 'C_6' as co_cluster_b,     88 as qt_individuos from dual union
select 'C_5' as co_cluster_A, 'C_3' as co_cluster_b,  11224 as qt_individuos from dual union
select 'C_5' as co_cluster_A, 'C_6' as co_cluster_b,    930 as qt_individuos from dual union
select 'C_8' as co_cluster_A, 'C_2' as co_cluster_b,      1 as qt_individuos from dual union
select 'C_3' as co_cluster_A, 'C_7' as co_cluster_b,      3 as qt_individuos from dual union
select 'C_3' as co_cluster_A, 'C_X' as co_cluster_b,      2 as qt_individuos from dual union
select 'C_4' as co_cluster_A, 'C_X' as co_cluster_b,      8 as qt_individuos from dual union
select 'C_5' as co_cluster_A, 'C_7' as co_cluster_b,    447 as qt_individuos from dual union
select 'C_6' as co_cluster_A, 'C_4' as co_cluster_b,    326 as qt_individuos from dual union
select 'C_3' as co_cluster_A, 'C_2' as co_cluster_b,    362 as qt_individuos from dual union
select 'C_8' as co_cluster_A, 'C_1' as co_cluster_b,     95 as qt_individuos from dual union
select 'C_2' as co_cluster_A, 'C_1' as co_cluster_b,  37245 as qt_individuos from dual union
select 'C_6' as co_cluster_A, 'C_7' as co_cluster_b,   5887 as qt_individuos from dual union
select 'C_4' as co_cluster_A, 'C_4' as co_cluster_b,   1741 as qt_individuos from dual union
select 'C_7' as co_cluster_A, 'C_6' as co_cluster_b,   6678 as qt_individuos from dual union
select 'C_3' as co_cluster_A, 'C_3' as co_cluster_b,    444 as qt_individuos from dual union
select 'C_2' as co_cluster_A, 'C_2' as co_cluster_b,     93 as qt_individuos from dual union
select 'C_2' as co_cluster_A, 'C_7' as co_cluster_b,     18 as qt_individuos from dual union
select 'C_4' as co_cluster_A, 'C_8' as co_cluster_b,      1 as qt_individuos from dual union
select 'C_8' as co_cluster_A, 'C_X' as co_cluster_b,      1 as qt_individuos from dual union
select 'C_6' as co_cluster_A, 'C_X' as co_cluster_b,      1 as qt_individuos from dual union
select 'C_6' as co_cluster_A, 'C_5' as co_cluster_b,   2025 as qt_individuos from dual union
select 'C_7' as co_cluster_A, 'C_1' as co_cluster_b,   2519 as qt_individuos from dual union
select 'C_4' as co_cluster_A, 'C_5' as co_cluster_b,   5199 as qt_individuos from dual union
select 'C_1' as co_cluster_A, 'C_6' as co_cluster_b,   3518 as qt_individuos from dual union
select 'C_6' as co_cluster_A, 'C_6' as co_cluster_b,    555 as qt_individuos from dual union
select 'C_6' as co_cluster_A, 'C_1' as co_cluster_b,    158 as qt_individuos from dual union
select 'C_3' as co_cluster_A, 'C_1' as co_cluster_b,    330 as qt_individuos from dual union
select 'C_2' as co_cluster_A, 'C_8' as co_cluster_b,     12 as qt_individuos from dual union
select 'C_7' as co_cluster_A, 'C_8' as co_cluster_b,      2 as qt_individuos from dual
order by co_cluster_A, co_cluster_B", 1, 1);
Note: See TracTickets for help on using tickets.