-- ==========================================================
-- Create Stored Procedure sp_gps_device_owner_get_all
-- ==========================================================
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		Elysee Dagan
-- Create date: 13-10-2012
-- Description:	returned true if distributor is child of item
-- =============================================
IF OBJECT_ID('[dbo].[sp_gps_device_owner_get_all]') IS NOT NULL 
    BEGIN
        DROP PROCEDURE [dbo].[sp_gps_device_owner_get_all]
        IF OBJECT_ID('[dbo].[sp_gps_device_owner_get_all]') IS NOT NULL 
            PRINT '*** FAILED DROPPING PROCEDURE [dbo].[sp_gps_device_owner_get_all]***'
        ELSE 
            PRINT '*** DROPPED PROCEDURE [dbo].[sp_gps_device_owner_get_all]****'
    END
go
CREATE PROCEDURE [dbo].[sp_gps_device_owner_get_all]
AS 
    BEGIN
    
        SELECT  [id] ,
                [owner_name] ,
                [owner_key] ,
                [is_client] ,
                [is_admin],
                distributor_id
        FROM    [dbo].[gps_device_owner]

    END
GO

GRANT EXEC ON [dbo].[sp_gps_device_owner_get_all] TO process_role     
GO

IF OBJECT_ID('[dbo].[sp_gps_device_owner_get_all]') IS NOT NULL 
    PRINT '*** CREATED PROCEDURE [dbo].[sp_gps_device_owner_get_all] ***'
ELSE 
    PRINT '*** FAILED CREATING PROCEDURE [dbo].[sp_gps_device_owner_get_all] ***'
go