This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | --共通利用項目指定------------------------------------------------------------------- | |
| WITH [CTE] (ツイート番号, --[CTE]という共通テーブルを宣言(項目名称でOK) | |
| 返信元ツイート番号, | |
| 発言ユーザ, | |
| ツイート内容, | |
| ツイート履歴 , | |
| 階層 | |
| ) AS | |
| --Root要素指定------------------------------------------------------------------- | |
| (SELECT CTE_Root.ツイート番号, --AS句で具体的にどんなデータもってるのか記述 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | --共通利用項目指定------------------------------------------------------------------- | |
| WITH [CTE] (ツイート番号, --[CTE]という共通テーブルを宣言(項目名称でOK) | |
| 返信元ツイート番号, | |
| 発言ユーザ, | |
| ツイート内容, | |
| ツイート履歴 , | |
| 階層 | |
| ) AS | |
| --Root要素指定------------------------------------------------------------------- | |
| (SELECT CTE_Root.ツイート番号, --AS句で具体的にどんなデータもってるのか記述 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | USE [BPD] | |
| GO | |
| CREATE TABLE [dbo].[Twitterリプライ管理]( | |
| [ツイート番号] [char](8) NOT NULL, | |
| [返信元ツイート番号] [char](8) NULL, | |
| [発言ユーザ][varchar](100) NOT NULL, | |
| [ツイート内容] [varchar](140) NULL | |
| ) ON [PRIMARY] | |
| GO | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | USE [BPD] | |
| GO | |
| CREATE TABLE [dbo].[案件履歴]( | |
| [案件No] [char](8) NOT NULL, | |
| [案件履歴No] [char](10) NOT NULL, | |
| [コメント] [varchar](max) NULL, | |
| ) ON [PRIMARY] | |
| GO |