dbo.MG_ALL_ENUM_DATA

Description

Properties

Name Value
ANSI Nulls ON

True

Quoted Identifier ON

True

Encrypted

False

Execute As
Assembly

Parameters

Name Data Type Length Description
@PARAMETER xml -1

SQL Script

SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
create procedure dbo.MG_ALL_ENUM_DATA
@PARAMETER xml='' 
--with encryption
as
declare @xStsnoheader varchar(2),
  @xStsno varchar(2),
  @xStsdes varchar(100)
set @xStsnoheader='01'
set @xStsno='00';
set @xStsdes='success'

declare @XmlSts xml
declare @raw xml
declare @raw_satuan xml
declare @raw_kemasan xml

 declare  
 @id int  ,
 @readonly int
  
  execUTE  [dbo].[S_ALL_LOG_DETAIL]
  @LOG_PARAM =@PARAMETER,
  @id = @id OUTPUT,
  @readonly = @readonly OUTPUT,
  @no = @xStsno OUTPUT,
  @des = @xStsdes OUTPUT
 
if @xStsno <>'00'
goto f 
 
set @raw=(
SELECT     rK, rV, rF
FROM         (

  SELECT    bc_type_id  as rK, bc_type_name as rV ,6 as rF
 FROM         enum_bc_type 
 where x=1
 union all
  SELECT    bc_type_id  as rK, bc_type_name as rV ,7 as rF
 FROM         enum_bc_type 
 where x=2
    
) AS xDATA
for xml path('xrow')
)
 
f:
 
set @XmlSts=(select @xStsnoheader + @xStsno as 'no', @xStsdes as 'des' for xml path('sts'))
select  CAST( (select  @XmlSts ,@raw   for xml path ('result')
)  as XML)  as dt
 
GO

Used By

No items found