-- Schema: dbo
-- Stored Procedure: TEST_GETNEXTTRIMESTRE

-- Stored procedure
CREATE procedure [dbo].[TEST_GETNEXTTRIMESTRE]
AS

BEGIN


--marzo
select c6martperiodico.getNextTrimestre(cast ('20121201' as datetime),0)
select c6martperiodico.getNextTrimestre(cast ('20121231' as datetime),0)
select c6martperiodico.getNextTrimestre(cast ('20120101' as datetime),0)
select c6martperiodico.getNextTrimestre(cast ('20120131' as datetime),0)
select c6martperiodico.getNextTrimestre(cast ('20120228' as datetime),0)

--giugno
select c6martperiodico.getNextTrimestre(cast ('20120301' as datetime),0)
select c6martperiodico.getNextTrimestre(cast ('20120331' as datetime),0)
select c6martperiodico.getNextTrimestre(cast ('20120401' as datetime),0)
select c6martperiodico.getNextTrimestre(cast ('20120430' as datetime),0)
select c6martperiodico.getNextTrimestre(cast ('20120531' as datetime),0)

--settembre
select c6martperiodico.getNextTrimestre(cast ('20120601' as datetime),0)
select c6martperiodico.getNextTrimestre(cast ('20120630' as datetime),0)
select c6martperiodico.getNextTrimestre(cast ('20120701' as datetime),0)
select c6martperiodico.getNextTrimestre(cast ('20120731' as datetime),0)
select c6martperiodico.getNextTrimestre(cast ('20120831' as datetime),0)

--dicembre
select c6martperiodico.getNextTrimestre(cast ('20120901' as datetime),0)
select c6martperiodico.getNextTrimestre(cast ('20120930' as datetime),0)
select c6martperiodico.getNextTrimestre(cast ('20121001' as datetime),0)
select c6martperiodico.getNextTrimestre(cast ('20121031' as datetime),0)
select c6martperiodico.getNextTrimestre(cast ('20121130' as datetime),0)



--marzo
select c6martperiodico.getNextTrimestre(cast ('20121201' as datetime),1)
select c6martperiodico.getNextTrimestre(cast ('20121231' as datetime),1)
select c6martperiodico.getNextTrimestre(cast ('20120101' as datetime),1)
select c6martperiodico.getNextTrimestre(cast ('20120131' as datetime),1)
select c6martperiodico.getNextTrimestre(cast ('20120228' as datetime),1)

--giugno
select c6martperiodico.getNextTrimestre(cast ('20120301' as datetime),1)
select c6martperiodico.getNextTrimestre(cast ('20120331' as datetime),1)
select c6martperiodico.getNextTrimestre(cast ('20120401' as datetime),1)
select c6martperiodico.getNextTrimestre(cast ('20120430' as datetime),1)
select c6martperiodico.getNextTrimestre(cast ('20120531' as datetime),1)

--settembre
select c6martperiodico.getNextTrimestre(cast ('20120601' as datetime),1)
select c6martperiodico.getNextTrimestre(cast ('20120630' as datetime),1)
select c6martperiodico.getNextTrimestre(cast ('20120701' as datetime),1)
select c6martperiodico.getNextTrimestre(cast ('20120731' as datetime),1)
select c6martperiodico.getNextTrimestre(cast ('20120831' as datetime),1)

--dicembre
select c6martperiodico.getNextTrimestre(cast ('20120901' as datetime),1)
select c6martperiodico.getNextTrimestre(cast ('20120930' as datetime),1)
select c6martperiodico.getNextTrimestre(cast ('20121001' as datetime),1)
select c6martperiodico.getNextTrimestre(cast ('20121031' as datetime),1)
select c6martperiodico.getNextTrimestre(cast ('20121130' as datetime),1)

END


