Back to OIM Explorer

dbo.QBM_FTJobCreateDBParameter

Inline Table FunctionSQL_INLINE_TABLE_VALUED_FUNCTIONSandbox DB

Inline Table Function.

Source: sandbox-db sys.sql_modules

Source size: 1.237 characters

Interpretation

  • Database function. Usually supports views, validation, or calculated predicates; look at referenced-by entries for callers.

Relations

  • No extracted relations.

Typed Edges

  • No typed edges extracted for this source.

References

  • No direct source references extracted.

Referenced By

Complete Source

SQL47 lines
1CREATE FUNCTION dbo.QBM_FTJobCreateDBParameter(2  @ComponentClass nvarchar(1024),3  @TaskName nvarchar(256),4  @ParameterSoFar dbo.QBM_YParameterList READONLY5) RETURNS TABLE6  WITH schemabinding7AS8RETURN(9SELECT10  'ConnectionProvider' AS ParameterName,11  d.ConnectionProvider AS ParameterValue12FROM dbo.DialogDatabase d13  WITH(nolock)14WHERE15  IsMainDatabase = 1 AND EXISTS(16SELECT TOP 1 117FROM dbo.JobComponent c18JOIN dbo.JobTask t19  ON c.UID_JobComponent = t.UID_JobComponent20JOIN dbo.JobParameter p21  ON p.UID_JobTask = t.UID_JobTask22WHERE23  c.ComponentClass = @ComponentClass AND t.TaskName = @TaskName AND p.Name = 'ConnectionProvider') AND NOT EXISTS(24SELECT TOP 1 125FROM @ParameterSoFar f26WHERE27  f.Parameter1 = 'ConnectionProvider')28UNION all29SELECT30  'ConnectionString',31  d.ConnectionString32FROM dbo.DialogDatabase d33  WITH(nolock)34WHERE35  IsMainDatabase = 1 AND EXISTS(36SELECT TOP 1 137FROM dbo.JobComponent c38JOIN dbo.JobTask t39  ON c.UID_JobComponent = t.UID_JobComponent40JOIN dbo.JobParameter p41  ON p.UID_JobTask = t.UID_JobTask42WHERE43  c.ComponentClass = @ComponentClass AND t.TaskName = @TaskName AND p.Name = 'ConnectionString') AND NOT EXISTS(44SELECT TOP 1 145FROM @ParameterSoFar f46WHERE47  f.Parameter1 = 'ConnectionString'))
Open raw exported source
SQL ยท Raw9 lines
1create function dbo.QBM_FTJobCreateDBParameter(@ComponentClass nvarchar(1024) , @TaskName nvarchar(256) , @ParameterSoFar dbo.QBM_YParameterList readOnly2  )  returns table with schemabinding as return (   select 'ConnectionProvider' as ParameterName , d.ConnectionProvider as ParameterValue from dbo.DialogDatabase3 d with (nolock) where IsMainDatabase = 1 and exists (select top 1 1 from dbo.JobComponent c join dbo.JobTask t on c.UID_JobComponent = t.UID_JobComponent4 join dbo.JobParameter p on p.UID_JobTask = t.UID_JobTask where c.ComponentClass = @ComponentClass and t.TaskName = @TaskName and p.Name = 'ConnectionProvider'5 ) and Not exists (select top 1 1 from @ParameterSoFar f where f.Parameter1 = 'ConnectionProvider' ) union all  select 'ConnectionString' , d.ConnectionString6 from dbo.DialogDatabase d with (nolock) where IsMainDatabase = 1 and exists (select top 1 1 from dbo.JobComponent c join dbo.JobTask t on c.UID_JobComponent7 = t.UID_JobComponent join dbo.JobParameter p on p.UID_JobTask = t.UID_JobTask where c.ComponentClass = @ComponentClass and t.TaskName = @TaskName and 8p.Name = 'ConnectionString' ) and Not exists (select top 1 1 from @ParameterSoFar f where f.Parameter1 = 'ConnectionString' ) ) 9