SQL - AYUDA DE UN EXPERTO URGE!!!

 
Vista:

AYUDA DE UN EXPERTO URGE!!!

Publicado por AA (1 intervención) el 13/12/2000 00:00:00
HOLA!
estoy haciendo un procedim. almacenado, pero me marca un error de sintaxis en un INTO y segun yo todo esta perfecto ¿alguien podria ayudarme?
las sentencias son las siguientes:

CREATE PROCEDURE "a713ap00".rep_kardex(inicio integer,fin integer,alma smallint,usa char(13))

DEFINE per,fol integer;
DEFINE alm,tip smallint;
DEFINE cant_e,cto_e,cant_s,cto_s,cae,cte,cas,cts integer;
DEFINE perio,foli,prov,clav,cant,exis integer;
DEFINE al,ti,ren smallint;
DEFINE fec date;
DEFINE reg, us char(13);
DEFINE imp,precio money(19,4);
DEFINE pr,sp,py,spy char(2);
DEFINE obs,des varchar(120);
DEFINE edo char(1);

let exis=0;
let cant_e=0;
let cto_e=0;
let cant_s=0;
let cto_s=0;

SELECT * FROM almacen:t_enc_mov em
WHERE
periodo>=inicio and periodo<=fin and almacen=alma and estado="A"
INTO temp tablita_k;

FOREACH
SELECT periodo,almacen,folio,tipo
INTO per,alm,fol,tip
FROM tablita_k

SELECT
em.periodo,em.almacen,em.folio,em.tipo,em.fecha,
em.provee,em.rfc, em.imptot,em.prog,em.subprog,em.proy,em.subproy,
em.observaciones,em.estado,
dm.renglon,dm.clave,dm.cantidad,dm.prec_uni,
a.desc,
i.existencia_i,
usa as usua,
cant_e as cant_ent,
cto_e as cto_ent,
cant_s as cant_sal,
cto_s as cto_sal

INTO
perio, ----> (AQUI ME MARCA EL ERROR)
al,foli,ti,fec,prov,reg,imp,pr,sp,py,spy,obs,edo,
ren,clav,cant,precio,des,exis,us,cae,
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:AYUDA DE UN EXPERTO URGE!!!

Publicado por EDELRIO (540 intervenciones) el 26/06/2002 02:50:25
Tu error esta aqui:

SELECT * FROM almacen:t_enc_mov em
WHERE
periodo>=inicio and periodo<=fin and almacen=alma and estado="A"
INTO temp tablita_k

debe ser

SELECT *
INTO temp tablita_k
FROM almacen:t_enc_mov em
WHERE
periodo>=inicio and periodo<=fin and almacen=alma and estado="A"

Saludos...
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar