use wroxdb
go

--
--   Name:  get_paytypes
--
--   Description: get all payment types
--
--
IF EXISTS (SELECT * FROM sysobjects WHERE name = 'get_paytypes')
BEGIN
    DROP PROCEDURE get_paytypes
END
GO
 
PRINT 'get_paytypes'
GO
CREATE PROCEDURE get_paytypes
AS
	SELECT '<pmt_types>'

	SELECT pmt_type, 
			descr
	FROM pmt_types
	FOR XML RAW

	SELECT '</pmt_types>'
 
GO
IF EXISTS (SELECT * FROM sysobjects WHERE name = 'get_paytypes')
   PRINT  '>>> Created procedure get_paytypes <<<'
GO

