SQL - Error : exception_acces_violation

 
Vista:

Error : exception_acces_violation

Publicado por Jessi (3 intervenciones) el 09/01/2003 15:41:04
Bueno deseo ayuda sobre el error siguiente : exception_acces_violation

Les explico, parece que no me han entendido:
En el codigo que les muestro esta

declare cursor_cierremensual cursor for Select codigo_cuenta, sum(importedebe) as totaldebe,sum(importehaber) as totalhaber from
(Select codigo_cuenta,SUM(importe_secuencia) as importedebe,'0'as importehaber from cont_comprobante_asiento where criterio_asiento='DEBE and anio_referencia = @anio and month(fec_creacion_documento) = @mes and inicio_periodo='N' and codigo_cuenta is not null
group by codigo_cuenta
union all
Select codigo_cuenta,'0'as importedebe,SUM(importe_secuencia) as importehaber from cont_comprobante_asiento
where criterio_asiento='HABER' and anio_referencia=@anio and month(fec_creacion_documento)=@mes and inicio_periodo='N' and codigo_cuenta is not null
group by codigo_cuenta
UNION ALL
Select con_cuenta,importe_asignado as importedebe,'0'as importehaber from cont_periodocontable_mensual where importe_asignado<=0 and cont_mes= @mes and cont_anio=@anio codigo_cuenta,'0' as importe from cont_comprobante_asiento
UNION ALL
Select con_cuenta,'0'as importedebe,imorte_asignado as importehaber from cont_periodocontable_mensual where importe_asignado<0 and cont_mes= @mes and cont_anio=@anio)a
group by codigo_cuenta

declare @cuenta varchar(30),
@totaldebe numeric(18,2),
@totalhaber numeric(18,2),
@saldoinicial numeric(18,2)

set nocount on
open cursor_cierremensual
while (@@fetch_status <> -1)
begin
Select @totalcierremensual=0
Select @saldoinicial=0
@totaldebe-@t
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:Error : exception_acces_violation

Publicado por Isaías Islas (5072 intervenciones) el 09/01/2003 18:17:31
Aqui le hace falta algo:

asiento='DEBE

cerrar con ('), quedando así: asiento = 'DEBE'

¿cierto?
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