|
<< Click to Display Table of Contents >> Navigation: iVend Database Database > User Defined Functions > ValidateNoficationEvent User Defined Function |
Navigation: iVend Database Database > User Defined Functions >
iVend 6.6 Database Help
ValidateNoficationEvent User Defined Function
Collapse All Expand All
iVend Database Database : ValidateNoficationEvent User Defined Function |
Properties
Creation Date |
4/13/2015 12:00 PM |
Encrypted |
|
Ansi Nulls |
|
Parameters
Parameter |
Direction |
Description |
Data Type |
Size |
@ObjectID |
In |
|
Integer |
4 |
@RETURN_VALUE |
Return Value |
|
Boolean |
1 |
Objects that depend on ValidateNoficationEvent
|
Database Object |
Object Type |
Description |
Dep Level |
|
Trigger |
|
1 |
Procedure Source Code
CREATE FUNCTION [dbo].[ValidateNoficationEvent] (@ObjectID int) RETURNS bit WITH EXECUTE AS CALLER As Begin Declare @IDs nVarchar(4000) Declare @Result bit set @Result=0 Set @IDs = '3,7,8,9,10,11,13,14,15,17,20,21,24,25,26,28,31,32,34,43,44,45,46,48,50,53,60,61,63,64,67,68,71,73,74,77,80,81,82,87,89,90,97,99,100,103,105,106,107,108,109,110,113,114,116,117,120,123,124,127,158,162,167,' -- Indexes to keep the position of searching Declare @Pos1 Int Declare @Pos2 Int -- Start from first character Set @Pos1=1 Set @Pos2=1 While @Pos1<Len(@IDs) Begin Set @Pos1 = CharIndex(',',@IDs,@Pos1) if @ObjectID=Substring(@IDs,@Pos2,@Pos1-@Pos2) begin --print Substring(@IDs,@Pos2,@Pos1-@Pos2) set @Result=1 break end -- Go to next non comma character Set @Pos2=@Pos1+1 -- Search from the next charcater Set @Pos1 = @Pos1+1 End --select @Result=0 Return (@Result) End |
See Also
© 2019 All Rights Reserved.
Send comments on this topic.