dbo.DA_GetStructureGroupId.StoredProcedure.sql 1.94 KB
USE [AIADatabaseV5]
GO
/****** Object:  StoredProcedure [dbo].[DA_GetStructureGroupId]    Script Date: 2/1/2018 12:15:55 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

-- =============================================
-- Author:		magic
-- Create date: 30/4/2009
-- Description:	Get  body view id and gender for given Structure Group Id
-- =============================================

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DA_GetStructureGroupId]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[DA_GetStructureGroupId]
GO

CREATE  PROCEDURE [dbo].[DA_GetStructureGroupId] 
	-- Add the parameters for the stored procedure here
@structure_group_id int
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;
	SELECT [DissectibleBodyViewId] ,
	Sex 
    FROM [DissectibleStructureGroup] it where
	Id=@structure_group_id
END

GO