dbo.QBM_PViewBuildU
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_PViewBuildU_intern source text reference
Complete Source
1CREATE PROCEDURE QBM_PViewBuildU(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 @DebugSwitch int = 012 DECLARE @ElementBuffer QBM_YCursorBuffer13 DECLARE @ElementCount int14 DECLARE @ElementIndex int15 SET XACT_ABORT OFF16 BEGIN TRY17 IF isnull(@GenProcID,18 '') = ''19 BEGIN20 SELECT @GenProcID = @GenProcID_R21 END22 INSERT INTO @ElementBuffer(UID1)23 SELECT x.UID_DialogTable24 FROM(25 SELECT26 UID_DialogTable AS UID_DialogTable,27 def.SortOrder28 FROM dialogtable t29 JOIN QBMModuleDef def30 ON31 LEFT(t.uid_dialogtable, 3) = def.ModuleName32 WHERE33 t.tabletype = 'U' AND(t.UID_DialogTable LIKE @UID_TablePattern)34 UNION35 SELECT36 @UID_TablePattern,37 038 WHERE39 charindex('%', @UID_TablePattern) = 0 AND @UID_TablePattern > ' ') AS x40 ORDER BY x.SortOrder,41 x.UID_DialogTable42 SELECT @ElementCount = @@ROWCOUNT43 SELECT @ElementIndex = 144 WHILE @ElementIndex <= @ElementCount45 BEGIN46 SELECT TOP 1 @UID_DialogTable = bu.UID147 FROM @ElementBuffer bu48 WHERE49 bu.ElementIndex = @ElementIndex50 IF @DebugSwitch > 051 BEGIN52 print 'creating U-view for ' + @UID_DialogTable53 END54 EXEC QBM_PViewBuildU_intern @UID_DialogTable,55 @GenProcID,56 @AutoCorrectColumns = @AutoCorrectColumns57 SELECT @ElementIndex += 158 END59 END TRY60 BEGIN CATCH61 EXEC QBM_PSessionErrorAdd DEFAULT62 DECLARE @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow()63 RAISERROR(@Rethrow,64 18,65 1)66 WITH NOWAIT67 END CATCH68 ende:69 RETURN70END
Open raw exported source
1 create procedure QBM_PViewBuildU ( @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 @DebugSwitch int = 30 declare @ElementBuffer QBM_YCursorBuffer declare @ElementCount int declare @ElementIndex int SET XACT_ABORT OFF BEGIN TRY if isnull(@GenProcID, '') =4 '' begin select @GenProcID = @GenProcID_R end insert into @ElementBuffer (UID1) select x.UID_DialogTable from ( select UID_DialogTable as UID_DialogTable5, def.SortOrder from dialogtable t join QBMModuleDef def on LEFT(t.uid_dialogtable, 3) = def.ModuleName where t.tabletype = 'U' and ( t.UID_DialogTable6 like @UID_TablePattern ) union select @UID_TablePattern, 0 where charindex('%', @UID_TablePattern ) = 0 and @UID_TablePattern > ' ' ) as x order by x.SortOrder7, x.UID_DialogTable select @ElementCount = @@ROWCOUNT select @ElementIndex = 1 while @ElementIndex <= @ElementCount begin select top 1 @UID_DialogTable8 = bu.UID1 from @ElementBuffer bu where bu.ElementIndex = @ElementIndex if @DebugSwitch > 0 begin print 'creating U-view for ' + @UID_DialogTable end exec9 QBM_PViewBuildU_intern @UID_DialogTable , @GenProcID, @AutoCorrectColumns = @AutoCorrectColumns select @ElementIndex += 1 end END TRY BEGIN CATCH exec10 QBM_PSessionErrorAdd default declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow, 18, 1) WITH NOWAIT END CATCH ende:11 return end 12