Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
V0247:
The specification states the following:
-
Subclause 4.28.2, "Characteristics of SQL-invoked routines": If a <routine invocation> is contained in the original <query expression> of a view, in the <search condition> of a check constraint or an assertion, the <triggered action> of a trigger, or in an <SQL-invoked routine>, then the subject routine for that invocation is determined at the time the view is created, the check constraint is defined, the assertion is created, the trigger is created, or the SQL-invoked routine is created. If a <routine invocation> is contained in the hierarchical <query expression> of a view V, then the subject routine for that invocation is determined at the time the subview SV of V whose original <query expression> contains the <routine invocation> is created. If the subject routine is an SQL-invoked procedure, an SQL-invoked regular function, or a static SQL-invoked method, then the same SQL-invoked routine is executed whenever the view is used, the check constraint or assertion is evaluated, the trigger is executed, or the SQL-invoked routine is invoked. If the subject routine is an instance SQL-invoked method, then the SQL-invoked routine that is executed is determined whenever the view is used, the check constraint or assertion is evaluated, the trigger is executed, or the SQL-invoked routine is invoked, based on the most specific type of the value resulting from the evaluation of the SQL argument that correspond to the subject parameter.
The [ISO/IEC9075-2:2008] specification differs as follows:
-
Subclause 4.27.2, "Characteristics of SQL-invoked routines": If a <routine invocation> is contained in a <query expression> of a view, in the <search condition> of a check constraint or an assertion, the <triggered action> of a trigger, or in an <SQL-invoked routine>, then the subject routine for that invocation is determined at the time the view is created, the check constraint is defined, the assertion is created, the trigger is created, or the SQL-invoked routine is created. If the subject routine is an SQL-invoked procedure, an SQL-invoked regular function, or a static SQL-invoked method, then the same SQL-invoked routine is executed whenever the view is used, the check constraint or assertion is evaluated, the trigger is executed, or the SQL-invoked routine is invoked. If the subject routine is an instance SQL-invoked method, then the SQL-invoked routine that is executed is determined whenever the view is used, the check constraint or assertion is evaluated, the trigger is executed, or the SQL-invoked routine is invoked, based on the most specific type of the value resulting from the evaluation of the SQL argument that correspond to the subject parameter.
Microsoft SQL Server 2008 R2 and Microsoft SQL Server 2012 vary as follows:
Transact-SQL does not support this feature.