Hi!
I´m getting an error while executing SQL SELECT with UNION:
"Internal Error" and fox dies, even executing the program in debug mode (trace window, step by step). The error message is in a System Error window (Wite window with the message at the middle)
This is a sample code that crashes, and seems to be simple:
select a.anio,a.anio_oper,a.fecha,a.num_operac,a.tipo_operac,a.peso,a.memoria,a.volumen,;
a.almacen,a.num_envase,a.alm_dest ;
from historic a into cursor trasv_cursor;
where a.proceso=w_proceso .and. ALLTRIM(a.numero)=ALLTRIM(w_numero) ;
.and. a.fraccion=w_fraccion .and. a.recepcion=padl(alltrim(str(w_recep)),4,"0"
;
.and. a.anio=w_anio ;
union ;
select a.anio,a.anio_oper,a.fecha,a.num_operac,a.tipo_operac,a.peso,a.memoria,a.volumen,;
a.almacen,a.num_envase,"" ;
from maestro a ;
where a.proceso=w_proceso .and. ALLTRIM(a.numero)=ALLTRIM(w_numero) ;
.and. a.fraccion=w_fraccion .and. a.recepcion=padl(alltrim(str(w_recep)),4,"0"
;
.and. a.anio=w_anio ;
order by 1,3,5,4
Has anyone this trouble? What could be the reason?
Thanks.
I´m getting an error while executing SQL SELECT with UNION:
"Internal Error" and fox dies, even executing the program in debug mode (trace window, step by step). The error message is in a System Error window (Wite window with the message at the middle)
This is a sample code that crashes, and seems to be simple:
select a.anio,a.anio_oper,a.fecha,a.num_operac,a.tipo_operac,a.peso,a.memoria,a.volumen,;
a.almacen,a.num_envase,a.alm_dest ;
from historic a into cursor trasv_cursor;
where a.proceso=w_proceso .and. ALLTRIM(a.numero)=ALLTRIM(w_numero) ;
.and. a.fraccion=w_fraccion .and. a.recepcion=padl(alltrim(str(w_recep)),4,"0"
.and. a.anio=w_anio ;
union ;
select a.anio,a.anio_oper,a.fecha,a.num_operac,a.tipo_operac,a.peso,a.memoria,a.volumen,;
a.almacen,a.num_envase,"" ;
from maestro a ;
where a.proceso=w_proceso .and. ALLTRIM(a.numero)=ALLTRIM(w_numero) ;
.and. a.fraccion=w_fraccion .and. a.recepcion=padl(alltrim(str(w_recep)),4,"0"
.and. a.anio=w_anio ;
order by 1,3,5,4
Has anyone this trouble? What could be the reason?
Thanks.