/***************************************
* STORED stp_getCartellinoByUdc
*
* ottiene il record del Cartellino dato l'UDC richiesto
*
* Steamware, S.E.L.
* mod: 2010.04.28
*
****************************************/
create PROCEDURE [dbo].[stp_getCartellinoByUdc]
(
	@UDC VARCHAR(50)
)
AS
SELECT      UDC, CodCS, ISNULL(CodCliente, '') AS CodCliente, ISNULL(RagSociale, '') AS RagSociale, ISNULL(Particolare, '') AS Particolare,
			ISNULL(DescParticolare,'') AS DescParticolare, ISNULL(DisegnoGrezzo,'') AS DisegnoGrezzo, ISNULL(Esponente,'') AS Esponente, 
			ISNULL(CodImpianto,'') AS CodImpianto, ISNULL(DescImpianto,'') AS DescImpianto, ISNULL(CodStampo,'') AS CodStampo, 
			ISNULL(Figura,'') AS Figura, ISNULL(DataFus,'') AS DataFus, ISNULL(TurnoFus,'') AS TurnoFus, ISNULL(CodImballo,'') AS CodImballo, 
			ISNULL(CodSoggetto,'') AS CodSoggetto, ISNULL(NumCont,'') AS NumCont, ISNULL(Tara,'') AS Tara, ISNULL(Qta,'')AS Qta, 
			ISNULL(CodStato,'') AS CodStato, ISNULL(IdxPosizione,'') AS IdxPosizione, ISNULL(PesoTot,'') AS PesoTot, ISNULL(PesoCad,'') AS PesoCad,
			CreateDate, ModDate
FROM            ElencoCartellini
WHERE        (UDC = @UDC)

RETURN
