Skip to content

Commit

Permalink
TSQL: Allow for multiple statements in a procedure
Browse files Browse the repository at this point in the history
  • Loading branch information
jpersons committed Oct 13, 2021
1 parent 40f1aba commit 52951e5
Showing 1 changed file with 54 additions and 3 deletions.
57 changes: 54 additions & 3 deletions test/fixtures/dialects/tsql/stored_procedured_mixed_statements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# computed by SQLFluff when running the tests. Please run
# `python test/generate_parse_fixture_yml.py` to generate them after adding or
# altering SQL files.
_hash: 36d43ecf327cda8bbaee155a8ed7aff51164bb7e387dd40917e97c2e478bca97
_hash: 5a9199e249ff2e03ef14c6833eb96ea0924cd942867ba7b8fa5f128d3a0f3986
file:
batch:
create_procedure_statement:
Expand All @@ -15,7 +15,7 @@ file:
- identifier: '[PowerPlan]'
- keyword: AS
- procedure_statement:
statement:
- statement:
declare_segment:
keyword: DECLARE
parameter: '@DATEFUNCTION'
Expand All @@ -28,12 +28,63 @@ file:
bracketed:
start_bracket: (
end_bracket: )
begin_end_block:
- statement:
drop_statement:
- keyword: DROP
- keyword: TABLE
- table_reference:
- identifier: '[Reporting]'
- dot: .
- identifier: '[PowerPlan_BASE]'
- statement_terminator: ;
- begin_end_block:
- keyword: BEGIN
- statement:
select_statement:
select_clause:
keyword: SELECT
select_clause_element:
literal: '1'
- statement:
create_table_as_select_statement:
- keyword: CREATE
- keyword: TABLE
- table_reference:
identifier: '#TempTest'
- table_distribution_index_clause:
keyword: WITH
bracketed:
start_bracket: (
table_distribution_clause:
- keyword: DISTRIBUTION
- comparison_operator: '='
- keyword: ROUND_ROBIN
comma: ','
table_index_clause:
keyword: HEAP
end_bracket: )
- keyword: AS
- bracketed:
start_bracket: (
select_statement:
select_clause:
- keyword: SELECT
- select_clause_element:
literal: '2'
alias_expression:
keyword: AS
identifier: Two
- comma: ','
- select_clause_element:
literal: '3'
alias_expression:
keyword: AS
identifier: Three
- comma: ','
- select_clause_element:
literal: '4'
alias_expression:
keyword: AS
identifier: Four
end_bracket: )
- keyword: END

0 comments on commit 52951e5

Please sign in to comment.