/***************************************
* STORED stp_UDC_getLast_ByParticolare
*
* elenco cartellini ULTIMO creati x particolare
*
* Steamware, S.E.L.
* mod: 2011.11.14
*
****************************************/
CREATE PROCEDURE [dbo].[stp_UDC_getLast_ByParticolare]
(
	@CodCS VARCHAR(2),
	@Particolare VARCHAR(15)
)
AS

	-- prendo ultimo UDC creato x il particolare
	SELECT		TOP 1 * FROM ElencoCartellini 
	WHERE		(Particolare= @Particolare) AND CodCS = @CodCS
	ORDER BY	CreateDate DESC

RETURN
