sqlparse.RepoObject_SqlModules_10_statement - V
type: V ( view ), modify_date: 2021-08-17 20:05:01
RepoObject_guid: F58F291C-9D61-EB11-84DC-A81E8446D5B0
Columns
PK | Column Name | Data Type | NULL? | ID |
---|---|---|---|---|
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
Indexes
idx_RepoObject_SqlModules_10_statement__1
-
IndexSemanticGroup: no_group
-
[column-RepoObject_guid]; uniqueidentifier
-
-
PK, Unique, Real: 0, 0, 0
Column Details
_
sql_modules_definition
sqlparse.RepoObject_SqlModules_10_statement - V script
/*extract class Statement, it should be the one and only node on first level*/
CREATE View sqlparse.RepoObject_SqlModules_10_statement
As
--
Select
T1.RepoObject_guid
, ro.SysObject_fullname
, T1.sql_modules_json
, j2.*
From
sqlparse.RepoObject_SqlModules As T1
Cross Apply
OpenJson ( T1.sql_modules_json )
With
(
class NVarchar ( 500 ) N'$.class'
, is_group Bit N'$.is_group'
, is_keyword Bit N'$.is_keyword'
, is_whitespace Bit N'$.is_whitespace'
, normalized NVarchar ( Max ) N'$.normalized'
, children NVarchar ( Max ) N'$.children' As Json
) As j2
Left Join
repo.RepoObject As ro
On
ro.RepoObject_guid = T1.RepoObject_guid
Where
T1.is_json_sql_modules_json = 1
And j2.class = 'Statement'