SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[paQryLogImagenes] @pmIdVehiculo VARCHAR(16),@pmIdConductor VARCHAR(16)
AS
SELECT TipoReg,IdRegistro,ImagenBin,NomArchivo,DescRegistro
FROM LogImagenes
WHERE (TipoReg='VEHICULO' AND (IdRegistro=@pmIdVehiculo OR @pmIdVehiculo IS NULL))
OR (TipoReg='CONDUCTOR' AND (IdRegistro=@pmIdConductor OR @pmIdConductor IS NULL))
