dbo.QBM_PViewBuildV
Stored ProcedureSQL_STORED_PROCEDURESandbox DB
Interpretation
- Database routine. Review parameters, called procedures, DBQueue inserts, and QBM_PJobCreate helper calls before assuming side effects.
Relations
- No extracted relations.
Typed Edges
- references source dbo.QBM_FGISessionContext source text reference
- references source dbo.QBM_FGISessionErrorRethrow source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
- references source dbo.QBM_PViewBuild source text reference
- references source dbo.QBM_PViewBuildV_intern source text reference
Complete Source
1CREATE PROCEDURE QBM_PViewBuildV(2 @UID_TablePattern varchar(38) = '%',3 @dummy1 varchar(38) = '%',4 @GenProcID varchar(38) = '%',5 @AutoCorrectColumns BIT = 06)7AS8BEGIN9 DECLARE @UID_DialogTable varchar(38)10 DECLARE @GenProcID_R varchar(38) = dbo.QBM_FGISessionContext('')11 DECLARE @ElementBuffer QBM_YCursorBuffer12 DECLARE @ElementCount int13 DECLARE @ElementIndex int14 SET XACT_ABORT OFF15 BEGIN TRY16 IF isnull(@GenProcID,17 '') = ''18 BEGIN19 SELECT @GenProcID = @GenProcID_R20 END21 INSERT INTO @ElementBuffer(UID1)22 SELECT x.UID_DialogTable23 FROM(24 SELECT25 t.UID_DialogTable AS UID_DialogTable,26 def.SortOrder27 FROM dialogtable t28 JOIN dialogtable b29 ON t.UID_DialogTableBase = b.UID_DialogTable30 JOIN QBMModuleDef def31 ON32 LEFT(t.uid_dialogtable, 3) = def.ModuleName33 WHERE34 t.tabletype = 'V' AND b.tabletype IN('B') AND(t.UID_DialogTable LIKE @UID_TablePattern)35 UNION36 SELECT37 @UID_TablePattern,38 039 WHERE40 charindex('%', @UID_TablePattern) = 0 AND @UID_TablePattern > ' ') AS x41 ORDER BY x.SortOrder,42 x.UID_DialogTable43 SELECT @ElementCount = @@ROWCOUNT44 SELECT @ElementIndex = 145 WHILE @ElementIndex <= @ElementCount46 BEGIN47 SELECT TOP 1 @UID_DialogTable = bu.UID148 FROM @ElementBuffer bu49 WHERE50 bu.ElementIndex = @ElementIndex51 EXEC QBM_PViewBuildV_intern @UID_DialogTable,52 @GenProcID,53 @AutoCorrectColumns = @AutoCorrectColumns54 SELECT @ElementIndex += 155 END56 END TRY57 BEGIN CATCH58 EXEC QBM_PSessionErrorAdd DEFAULT59 DECLARE @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow()60 RAISERROR(@Rethrow,61 18,62 1)63 WITH NOWAIT64 END CATCH65 ende:66 RETURN67END
Open raw exported source
1 create procedure QBM_PViewBuildV ( @UID_TablePattern varchar(38) = '%' , @dummy1 varchar(38) = '%' , @GenProcID varchar(38) = '%' , @AutoCorrectColumns2 bit = 0 ) as begin declare @UID_DialogTable varchar(38) declare @GenProcID_R varchar(38) = dbo.QBM_FGISessionContext('') declare @ElementBuffer QBM_YCursorBuffer3 declare @ElementCount int declare @ElementIndex int SET XACT_ABORT OFF BEGIN TRY if isnull(@GenProcID, '') = '' begin select @GenProcID = @GenProcID_R4 end insert into @ElementBuffer (UID1) select x.UID_DialogTable from ( select t.UID_DialogTable as UID_DialogTable, def.SortOrder from dialogtable t join5 dialogtable b on t.UID_DialogTableBase = b.UID_DialogTable join QBMModuleDef def on LEFT(t.uid_dialogtable, 3) = def.ModuleName where t.tabletype = 'V'6 and b.tabletype in ('B') and ( t.UID_DialogTable like @UID_TablePattern ) union select @UID_TablePattern, 0 where charindex('%', @UID_TablePattern ) 7= 0 and @UID_TablePattern > ' ' ) as x order by x.SortOrder, x.UID_DialogTable select @ElementCount = @@ROWCOUNT select @ElementIndex = 1 while @ElementIndex8 <= @ElementCount begin select top 1 @UID_DialogTable = bu.UID1 from @ElementBuffer bu where bu.ElementIndex = @ElementIndex exec QBM_PViewBuildV_intern9 @UID_DialogTable , @GenProcID, @AutoCorrectColumns = @AutoCorrectColumns select @ElementIndex += 1 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd 10default declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow, 18, 1) WITH NOWAIT END CATCH ende: return end 11