Hi ,
What / when/ why @ Design bit is used? I am looking into few SP's some has and others don't? Does it make a difference to include it or not?
Thanks,
Pasi
Hi ,
What / when/ why @ Design bit is used? I am looking into few SP's some has and others don't? Does it make a difference to include it or not?
Thanks,
Pasi
Seriously, I have no idea what you are talking about.
Can you post an example?
@ is used to name variables.
HI Graz, I have see people use @design BIt a lot, here is an example:
/****** Object: StoredProcedure [dbo].[prov_exp_reason_dbp] Script Date: 05/12/2016 14:43:24 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE Proc [dbo].[prov_exp_reason_dbp]
@DESIGN Bit
as
select mstr_list_item_desc as Expiration_Reason , mstr_list_item_id as ID
from mstr_lists
where mstr_list_type = 'prov_exp_reason' AND delete_ind = 'N'
order by mstr_lists.mstr_list_item_desc asc
GO
@DESIGN is a parameter to the Procedure. In the example code you have provided it is not used.
If it appears in many/all your SProcs then I expect it is to allow someone to test the SProc by passing the parameter @DESIGN=1 and then the SProc can, optionally, output some extra, debug, information.
We have that in ALL our SProcs - except that we call it @DEBUG and its an INT so that @DEBUG=1 will output basic information and @DEBUG=2 etc. will output more detailed information.
Ok Thanks Kristen..