Hi all,
how can I create a Fold for T-SQL Script like this:
if @i != 0
begin
set @state = 'ALBERTA'
Set @new_state = case @state
when 'ALBERTA' then 'AB'
else 'n/a'
end -- case
set @country ='CANADA'
end -- if
I've following Folding ID's
FoldID if
FOLD_BEGIN begin
FOLD_END end
FoldID case
FOLD_BEGIN case
FOLD_END end
The end for the if-statement will not be recognize in this case.
I hope anyone can help me.
Thanks
Ronald
Create Foldblock for T-SQL
- Rickard Johansson
- Site Admin
- Posts: 6749
- Joined: 19 Jul 2006 14:29
- Rickard Johansson
- Site Admin
- Posts: 6749
- Joined: 19 Jul 2006 14:29
I just tried to add this to the SQL syntax:
[Fold]
1_Id=if
1_Begin=begin
1_End=end
1_EndBefore=
1_Section=
1_NoParentOfId=0
1_ListItem=
2_Id=case
2_Begin=
2_End=end
2_EndBefore=
2_Section=
2_NoParentOfId=0
2_ListItem=
I used the syntax editor and RJ TextEd v5.01.
The code
if @i != 0
begin
set @state = 'ALBERTA'
Set @new_state = case @state
when 'ALBERTA' then 'AB'
else 'n/a'
end -- case
set @country ='CANADA'
end -- if
folds just fine. Both the case and if statements are folded properly.
[Fold]
1_Id=if
1_Begin=begin
1_End=end
1_EndBefore=
1_Section=
1_NoParentOfId=0
1_ListItem=
2_Id=case
2_Begin=
2_End=end
2_EndBefore=
2_Section=
2_NoParentOfId=0
2_ListItem=
I used the syntax editor and RJ TextEd v5.01.
The code
if @i != 0
begin
set @state = 'ALBERTA'
Set @new_state = case @state
when 'ALBERTA' then 'AB'
else 'n/a'
end -- case
set @country ='CANADA'
end -- if
folds just fine. Both the case and if statements are folded properly.
Hi Richard,
sorry for late answer.
I've got this fold (It tooks the first case --end and not the end --if)
if @i != 0 ...
set @country ='CANADA'
end -- if
and not
if @i != 0 ...
Syntax:
PostPosted: Sat Apr 25, 2009 5:26 pm Post subject:
I just tried to add this to the SQL syntax:
[Fold]
1_Id=if
1_Begin=begin
1_End=end
1_EndBefore=
1_Section=
1_NoParentOfId=0
1_ListItem=
2_Id=case
2_Begin=
2_End=end
2_EndBefore=
2_Section=
2_NoParentOfId=0
2_ListItem=
with RJ TextEd v5.01
sorry for late answer.
I've got this fold (It tooks the first case --end and not the end --if)
if @i != 0 ...
set @country ='CANADA'
end -- if
and not
if @i != 0 ...
Syntax:
PostPosted: Sat Apr 25, 2009 5:26 pm Post subject:
I just tried to add this to the SQL syntax:
[Fold]
1_Id=if
1_Begin=begin
1_End=end
1_EndBefore=
1_Section=
1_NoParentOfId=0
1_ListItem=
2_Id=case
2_Begin=
2_End=end
2_EndBefore=
2_Section=
2_NoParentOfId=0
2_ListItem=
with RJ TextEd v5.01
- Rickard Johansson
- Site Admin
- Posts: 6749
- Joined: 19 Jul 2006 14:29