Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I am trying to load data from ODBC source, like this:
CASA_Paqueteria:
LOAD num_cobo, fec_entr;
SQL select distinct c.num_cobo,a.fec_entr
from cboo_cobo c
join cboo_guias b on (b.num_cobo = c.num_cobo)
join cboo_paqueteria a on (a.num_guiacom = b.num_guiacom)
where c.fec_entr >= '2018-01-01';
When I try to load the QV Script, I am getting an error:
Field not found - <num_cobo>
SQL select distinct c.num_cobo,a.fec_entr
from cboo_cobo c
join cboo_guias b on (b.num_cobo = c.num_cobo)
join cboo_paqueteria a on (a.num_guiacom = b.num_guiacom)
where c.fec_entr >= '2018-01-01'
However, if I try the SQL code directly on the database, I do get valid data.
I am sure the ODBC source is pointed correctly, as I only have one database. Things I've tried:
However, the error persists. What else can I do?
Thanks,
-Eduardo
I found the answer. I needed to write the field names in all caps in the LOAD, like this:
CASA_Paqueteria:
LOAD NUM_COBO, FEC_ENTR;
SQL select distinct c.num_cobo,a.fec_entr
from cboo_cobo c
join cboo_guias b on (b.num_cobo = c.num_cobo)
join cboo_paqueteria a on (a.num_guiacom = b.num_guiacom)
where c.fec_entr >= '2018-01-01';
Thanks,
-Eduardo
I found the answer. I needed to write the field names in all caps in the LOAD, like this:
CASA_Paqueteria:
LOAD NUM_COBO, FEC_ENTR;
SQL select distinct c.num_cobo,a.fec_entr
from cboo_cobo c
join cboo_guias b on (b.num_cobo = c.num_cobo)
join cboo_paqueteria a on (a.num_guiacom = b.num_guiacom)
where c.fec_entr >= '2018-01-01';
Thanks,
-Eduardo