/*(
* STORED stp_ParticolariFiguraByParticolare
*
* elenco distinct particolari/figure da particoalre
*
* Steamware, S.E.L.
* mod: 2010.07.07
*
****************************************/
create PROCEDURE [dbo].[stp_ParticolariFiguraByParticolare]
(
	@Particolare VARCHAR(50)
)
AS
	SELECT DISTINCT Particolare, DescParticolare, Esponente, Figura, CodImballo
	FROM	(
				SELECT       TOP (1) @Particolare AS Particolare, '' AS DescParticolare, '' AS Esponente, '*' AS Figura, '' AS CodImballo
				FROM         v_particolariEsponenteFigura
                WHERE        (Particolare = @Particolare)
			 UNION
				SELECT		DISTINCT Particolare, '' AS DescParticolare, '' AS  Esponente, Figura, '' AS CodImballo
				FROM		v_particolariEsponenteFigura
				WHERE		Particolare = @Particolare
			) AS derivTab

RETURN
