In File->Options->General we want to add the Option :
Label : '/' Statement separator
Description : In SQL Scripts, interpret '/' on an empty line as a statement separator.
Default value : Enabled
The value of this option will be used in AFScriptParser.isBatchEnd().
2 KB
Currently, you can do this in SQL Server :
select 5
/ 5
Or ...
select
5 /
5
But you can't do ...
select
5
/
5
We'd like to add the option so you can also do the last scenario if the user chooses to disable the option.
Does it not conflict with the following File->Options->General option:
'/' at End of Line Terminates Statement
when the script line only contains '/'?
Does it not conflict with the following File->Options->General option:
'/' at End of Line Terminates Statement
when the script line only contains '/'?
If ['/' Statement separator] is disabled, then the ['/' at End of Line Terminates Statement
] option should be ignored.
If ['/' Statement separator] is disabled, then the ['/' at End of Line Terminates Statement
] option should be ignored.
Testing Steps:
Steps to enable/disable option setting:
1. In Menubar, Go to File ->Options -> General
‘/’ Statement Separator
‘/’ at End of Line Terminates Statement
2. Enable/Disable this option , Click on OK.
3. Open Query Analyzer, and then execute the script
Result observed on ADS 16.0.9-2
-- / Statement Separator = Disabled
-- / at end of line terminates statement = Enabled; in build 16.0.9-2
-- Answer = 1
select 5
/ 5
-- / Statement Separator = Disabled
-- / at end of line terminates statement = Enabled; in build 16.0.9-2
-- Incorrect Syntax
select
5 /
5
/
-- / Statement Separator = Disabled
-- / at end of line terminates statement = Enabled; in build 16.0.9-2
-- Incorrect Syntax
select
5
/
5
/
-- / Statement Separator = Disabled
-- / at end of line terminates statement = Enabled; in build 16.0.9-2
-- Answer = 1
select
5 / 5
-- / Statement Separator = Enabled
-- / at end of line terminates statement = Disabled; in build 16.0.9-2
-- Answer = 1
select 5
/ 5
-- / Statement Separator = Enabled
-- / at end of line terminates statement = Disabled; in build 16.0.9-2
-- Answer = 1
select
5 /
5
/
-- / Statement Separator = Enabled
-- / at end of line terminates statement = Disabled; in build 16.0.9-2
-- Answer =5 and Incorrect Syntax
select
5
/
5
/
-- / Statement Separator = Enabled
-- / at end of line terminates statement = Disabled; in build 16.0.9-2
-- Answer = 5 and Syntax Error
select
5
/
5
-- / Statement Separator = Enabled
-- / at end of line terminates statement = Enabled; in build 16.0.9-2
-- Answer = 1
select 5
/ 5
-- / Statement Separator = Enabled
-- / at end of line terminates statement = Enabled; in build 16.0.9-2
-- Answer = 5 + Syntax Error
select
5 /
5
/
-- / Statement Separator = Enabled
-- / at end of line terminates statement = Enabled; in build 16.0.9-2
-- Answer = 5 and Incorrect Syntax
select
5
/
5
/
-- / Statement Separator = Enabled
-- / at end of line terminates statement = Enabled; in build 16.0.9-2
-- Answer = 5 and Syntax Error
select
5
/
5
======================================
Previous Build behaviour- ADS-16.0.5-30
[when / Statement Separator option is not available]
--With only / at end of line terminates statement in build earlier than v16.0.5-32[Tested on build: ADS16.0.5-30]
-- Answer =1
select 5
/ 5 /
/
-- With only / at end of line terminates statement in build earlier than v16.0.5-32[Tested on build: ADS16.0.5-30]
-- Answer=5 and incorrect syntax
select
5 /
5
/
-- With only / at end of line terminates statement in build earlier than v16.0.5-32[Tested on build: ADS16.0.5-30]
-- Answer=1 and incorrect syntax
select
5
/
5
/
================================
==Tested for previous build-ADS15.0.16-1
[when / Statement Separator option is not available]
-- With only / at end of line terminates statement in build 15.0.16-1
-- Answer =1
select 5
/ 5 /
/
-- With only / at end of line terminates statement in build 15.0.16-1
-- Answer = 5 and incorrect syntax
select
5 /
5
/
-- With only / at end of line terminates statement in build 15.0.16-1
-- Answer = 1 and incorrect syntax
select
5
/
5
/
Testing Steps:
Steps to enable/disable option setting:
1. In Menubar, Go to File ->Options -> General
‘/’ Statement Separator
‘/’ at End of Line Terminates Statement
2. Enable/Disable this option , Click on OK.
3. Open Query Analyzer, and then execute the script
Result observed on ADS 16.0.9-2
-- / Statement Separator = Disabled
-- / at end of line terminates statement = Enabled; in build 16.0.9-2
-- Answer = 1
select 5
/ 5
-- / Statement Separator = Disabled
-- / at end of line terminates statement = Enabled; in build 16.0.9-2
-- Incorrect Syntax
select
5 /
5
/
-- / Statement Separator = Disabled
-- / at end of line terminates statement = Enabled; in build 16.0.9-2
-- Incorrect Syntax
select
5
/
5
/
-- / Statement Separator = Disabled
-- / at end of line terminates statement = Enabled; in build 16.0.9-2
-- Answer = 1
select
5 / 5
-- / Statement Separator = Enabled
-- / at end of line terminates statement = Disabled; in build 16.0.9-2
-- Answer = 1
select 5
/ 5
-- / Statement Separator = Enabled
-- / at end of line terminates statement = Disabled; in build 16.0.9-2
-- Answer = 1
select
5 /
5
/
-- / Statement Separator = Enabled
-- / at end of line terminates statement = Disabled; in build 16.0.9-2
-- Answer =5 and Incorrect Syntax
select
5
/
5
/
-- / Statement Separator = Enabled
-- / at end of line terminates statement = Disabled; in build 16.0.9-2
-- Answer = 5 and Syntax Error
select
5
/
5
-- / Statement Separator = Enabled
-- / at end of line terminates statement = Enabled; in build 16.0.9-2
-- Answer = 1
select 5
/ 5
-- / Statement Separator = Enabled
-- / at end of line terminates statement = Enabled; in build 16.0.9-2
-- Answer = 5 + Syntax Error
select
5 /
5
/
-- / Statement Separator = Enabled
-- / at end of line terminates statement = Enabled; in build 16.0.9-2
-- Answer = 5 and Incorrect Syntax
select
5
/
5
/
-- / Statement Separator = Enabled
-- / at end of line terminates statement = Enabled; in build 16.0.9-2
-- Answer = 5 and Syntax Error
select
5
/
5
======================================
Previous Build behaviour- ADS-16.0.5-30
[when / Statement Separator option is not available]
--With only / at end of line terminates statement in build earlier than v16.0.5-32[Tested on build: ADS16.0.5-30]
-- Answer =1
select 5
/ 5 /
/
-- With only / at end of line terminates statement in build earlier than v16.0.5-32[Tested on build: ADS16.0.5-30]
-- Answer=5 and incorrect syntax
select
5 /
5
/
-- With only / at end of line terminates statement in build earlier than v16.0.5-32[Tested on build: ADS16.0.5-30]
-- Answer=1 and incorrect syntax
select
5
/
5
/
================================
==Tested for previous build-ADS15.0.16-1
[when / Statement Separator option is not available]
-- With only / at end of line terminates statement in build 15.0.16-1
-- Answer =1
select 5
/ 5 /
/
-- With only / at end of line terminates statement in build 15.0.16-1
-- Answer = 5 and incorrect syntax
select
5 /
5
/
-- With only / at end of line terminates statement in build 15.0.16-1
-- Answer = 1 and incorrect syntax
select
5
/
5
/
Issue #13715 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build 16.0.8-8, 17.0.0-rc-9, 18.0.0-dev-2 |
No time estimate |
1 issue link |
breaks #13773
Issue #13773Procedure Editor broken for Oracle Stored procedures - seems to be a recent V16 regression |
Currently, you can do this in SQL Server :
select 5
/ 5
Or ...
select
5 /
5
But you can't do ...
select
5
/
5
We'd like to add the option so you can also do the last scenario if the user chooses to disable the option.