Está en la página 1de 6

ns1:Column

declare @p1 int


set @p1=180150119
declare @p3 int
set @p3=1
declare @p4 int
set @p4=1
declare @p5 int
set @p5=10
exec sp_cursoropen @p1 output,N'Select Top 40000 d.bodega,
d.sw,d.fecha_hora,d.tipo,d.numero,d.valor_total,d.valor_aplicado,d.notas,d.usuario from
documentos d WITH (Index=IX_documentos_nit) Where d.nit=94454639 And d.anulado=0 And
(d.fecha >=''20190605 00:00:00'' and d.fecha < =''20200605 23:59:59'') And d.sw <> 16',@p3
output,@p4 output,@p5 output
select @p1, @p3, @p4, @p5

declare @p1 int


set @p1=180150121
declare @p3 int
set @p3=4
declare @p4 int
set @p4=1
declare @p5 int
set @p5=-1
exec sp_cursoropen @p1 output,N'Select Recibio From Documentos_che_entregados Where
Tipo=''FMAT'' And Numero=5327 and (fecha_hora>=''20190605'' and fecha_hora<
=''20200605'')',@p3 output,@p4 output,@p5 output
select @p1, @p3, @p4, @p5

declare @p1 int


set @p1=180150123
declare @p3 int
set @p3=4
declare @p4 int
set @p4=1
declare @p5 int
set @p5=-1
exec sp_cursoropen @p1 output,N'Select Recibio From Documentos_che_entregados Where
Tipo=''FRBN'' And Numero=5130 and (fecha_hora>=''20190605'' and fecha_hora<
=''20200605'')',@p3 output,@p4 output,@p5 output
select @p1, @p3, @p4, @p5
declare @p1 int
set @p1=180150125
declare @p3 int
set @p3=4
declare @p4 int
set @p4=1
declare @p5 int
set @p5=-1
exec sp_cursoropen @p1 output,N'Select Recibio From Documentos_che_entregados Where
Tipo=''FRBN'' And Numero=5151 and (fecha_hora>=''20190605'' and fecha_hora<
=''20200605'')',@p3 output,@p4 output,@p5 output
select @p1, @p3, @p4, @p5

declare @p1 int


set @p1=180150127
declare @p3 int
set @p3=4
declare @p4 int
set @p4=1
declare @p5 int
set @p5=-1
exec sp_cursoropen @p1 output,N'Select Recibio From Documentos_che_entregados Where
Tipo=''FTLL'' And Numero=164828 and (fecha_hora>=''20190605'' and fecha_hora<
=''20200605'')',@p3 output,@p4 output,@p5 output
select @p1, @p3, @p4, @p5

declare @p1 int


set @p1=180150129
declare @p3 int
set @p3=4
declare @p4 int
set @p4=1
declare @p5 int
set @p5=-1
exec sp_cursoropen @p1 output,N'Select Recibio From Documentos_che_entregados Where
Tipo=''FVNV'' And Numero=22574 and (fecha_hora>=''20190605'' and fecha_hora<
=''20200605'')',@p3 output,@p4 output,@p5 output
select @p1, @p3, @p4, @p5
declare @p1 int
set @p1=180150131
declare @p3 int
set @p3=4
declare @p4 int
set @p4=1
declare @p5 int
set @p5=-1
exec sp_cursoropen @p1 output,N'Select Recibio From Documentos_che_entregados Where
Tipo=''RCNT'' And Numero=92335 and (fecha_hora>=''20190605'' and fecha_hora<
=''20200605'')',@p3 output,@p4 output,@p5 output
select @p1, @p3, @p4, @p5

declare @p1 int


set @p1=180150133
declare @p3 int
set @p3=4
declare @p4 int
set @p4=1
declare @p5 int
set @p5=-1
exec sp_cursoropen @p1 output,N'Select Recibio From Documentos_che_entregados Where
Tipo=''RCNT'' And Numero=92336 and (fecha_hora>=''20190605'' and fecha_hora<
=''20200605'')',@p3 output,@p4 output,@p5 output
select @p1, @p3, @p4, @p5

declare @p1 int


set @p1=180150135
declare @p3 int
set @p3=4
declare @p4 int
set @p4=1
declare @p5 int
set @p5=-1
exec sp_cursoropen @p1 output,N'Select Recibio From Documentos_che_entregados Where
Tipo=''RCNT'' And Numero=93133 and (fecha_hora>=''20190605'' and fecha_hora<
=''20200605'')',@p3 output,@p4 output,@p5 output
select @p1, @p3, @p4, @p5
declare @p1 int
set @p1=180150137
declare @p3 int
set @p3=4
declare @p4 int
set @p4=1
declare @p5 int
set @p5=-1
exec sp_cursoropen @p1 output,N'Select Recibio From Documentos_che_entregados Where
Tipo=''RCS2'' And Numero=20080 and (fecha_hora>=''20190605'' and fecha_hora<
=''20200605'')',@p3 output,@p4 output,@p5 output
select @p1, @p3, @p4, @p5

declare @p1 int


set @p1=180150139
declare @p3 int
set @p3=4
declare @p4 int
set @p4=1
declare @p5 int
set @p5=-1
exec sp_cursoropen @p1 output,N'Select Recibio From Documentos_che_entregados Where
Tipo=''RCSR'' And Numero=60985 and (fecha_hora>=''20190605'' and fecha_hora<
=''20200605'')',@p3 output,@p4 output,@p5 output
select @p1, @p3, @p4, @p5

declare @p1 int


set @p1=180150141
declare @p3 int
set @p3=4
declare @p4 int
set @p4=1
declare @p5 int
set @p5=-1
exec sp_cursoropen @p1 output,N'Select d.bodega,
d.sw,d.fecha,d.fecha_hora,d.numero,d.valor_total,d.notas,d.usuario from documentos_ped d
WITH (Index=IX_documentos_ped_nit) where d.nit=94454639 And d.anulado=0 and (d.fecha
>=''20190605 00:00:00'' and d.fecha < =''20200605 23:59:59'')',@p3 output,@p4 output,@p5
output
select @p1, @p3, @p4, @p5
declare @p1 int
set @p1=180150143
declare @p3 int
set @p3=4
declare @p4 int
set @p4=1
declare @p5 int
set @p5=-1
exec sp_cursoropen @p1 output,N'Select
d.bodega,d.numero,d.fecha,d.kilometraje,d.rombo,d.notas from tall_encabeza_orden d where
d.nit=94454639 And d.anulada=0 and (d.fecha >=''20190605 00:00:00'' and d.fecha < =''20200605
23:59:59'')',@p3 output,@p4 output,@p5 output
select @p1, @p3, @p4, @p5

declare @p1 int


set @p1=180150145
declare @p3 int
set @p3=4
declare @p4 int
set @p4=1
declare @p5 int
set @p5=-1
exec sp_cursoropen @p1 output,N'Select
d.fecha_recibido,d.banco,d.documento,d.fecha_consignar,d.valor,d.notas from
documentos_che_pos d where d.nit=94454639 And (d.fecha_recibido>=''20190605'' and
d.fecha_recibido< =''20200605'')',@p3 output,@p4 output,@p5 output
select @p1, @p3, @p4, @p5

declare @p1 int


set @p1=180150147
declare @p3 int
set @p3=4
declare @p4 int
set @p4=1
declare @p5 int
set @p5=-1
exec sp_cursoropen @p1 output,N'Select
c.*,a.nombre,desgru=g.descripcion,isnuLl(r.descripcion,'''') as
c1,dessub=s.descripcion,s.fore_color,s.back_color from crm_citas c LEFT JOIN CRM_tipos_gru g ON
c.id_gru=g.id_gru LEFT JOIN CRM_tipos_sub s ON c.id_gru=s.id_gru and c.id_sub=s.id_sub LEFT
JOIN CRM_Contactos a ON a.nit=c.nit and a.contacto=c.contacto left join crm_resultados r on r.id =
c.resultado Where c.nit=94454639 and (c.fecha_hora >=''20190605'' and c.fecha_hora <
=DATEADD(d,1,''20200605''))',@p3 output,@p4 output,@p5 output
select @p1, @p3, @p4, @p5
declare @p1 int
set @p1=180150149
declare @p3 int
set @p3=4
declare @p4 int
set @p4=1
declare @p5 int
set @p5=-1
exec sp_cursoropen @p1 output,N'Select * from #tempo Order by fecha_hora DESC',@p3
output,@p4 output,@p5 output
select @p1, @p3, @p4, @p5

También podría gustarte