Select 0
ADSCreateSQLStatement("CFE",3)
cSQL := "SELECT {static} * from NOTASS WHERE ESTATUS = 'A' AND FECHA >= '"+cF1+"' AND FECHA <= '"+cF2+"' AND CFE_NUM like '%0%'"
ADSExecuteSQLDirect(cSQL)
select l.c_codart, l.c_cantidad AS entrada, 0 AS salida, l.c_tlinea AS ptscompra, 0 AS ptsventa
FROM lfacpro AS l, facpro AS a, articu AS z
WHERE l.c_serie=a.c_serie AND l.c_numrecp=a.c_numrecp AND l.c_codart=z.c_codart AND UPPER(z.c_controls)='S'
AND a.c_serie>='&serie1' and a.c_serie<='&serie2' and
a.c_freg>='&cFecha1' and a.c_freg<='&cFecha2'
AND l.c_serie+SPACE(2)+CONVERT(l.c_numrecp, SQL_CHAR) NOT IN
(SELECT DISTINCT x.c_serie+SPACE(2)+CONVERT(x.c_numrecp, SQL_CHAR) FROM lfacpro AS x WHERE x.c_concepto LIKE 'Alb. ________ Fecha%')
dbselectar(0)
if AdsCreateSqlStatement( "ADSSQL", 2 )
AdsExecuteSqlDirect( cQuery )
dbselectar(0)
if AdsCreateSqlStatement( "ADSSQL", 2 )
AdsPrepareSql( cQuery )
AdsExecuteSql( cQuery )
.....
select l.c_codart, l.c_cantidad AS entrada, 0 AS salida, l.c_tlinea AS ptscompra, 0 AS ptsventa
FROM lfacpro AS l, facpro AS a, articu AS z
WHERE l.c_serie=a.c_serie AND l.c_numrecp=a.c_numrecp AND l.c_codart=z.c_codart AND UPPER(z.c_controls)='S'
AND a.c_serie>='&serie1' and a.c_serie<='&serie2' and
a.c_freg>='&cFecha1' and a.c_freg<='&cFecha2'
SELECT DISTINCT x.c_serie+SPACE(2)+CONVERT(x.c_numrecp, SQL_CHAR) FROM lfacpro AS x WHERE x.c_concepto LIKE 'Alb. _______para_ Fecha%'
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: Google [Bot] and 31 guests