Settings and activity
2 results found
-
2 votes
An error occurred while saving the comment -
9 votesBrian Cunningham supported this idea ·
An error occurred while saving the comment Brian Cunningham commentedI can understand why a broken SQL statement would cause this feature problems, especially if you're asking SQL Server to parse the SQL. I would like to offer a suggestion.
If there's a SQL error, require us to separate our SQL statements with semicolons. This should make the feature very easy to implement since it is just start at the cursor, go backwards until BOF or a semicolon, go forward until EOF or a semicolon, execute what's in the middle.
Since I'm coming back to SQL Prompt after being in the Oracle world for the past nine years, I've gotten used to ending all of my statements with a semicolon. However, I don't think I'm the only one that bears Oracle scars and would appreciate this feature.
P.S. If you're in the mood to steal features, another feature that Toad for Oracle has is to run the "snippet at cursor" where "snippet at cursor" is defined as "non-blank lines with blank lines before and after."
While this feature sounds neat, until then perhaps consider "SET IMPLICT_TRANSACTIONS". In SSMS it is here: Tools | Options, Query Execution, SQL Server, ANSI.
It may be overkill, but to me it is better than forgetting a transaction. Now I just forget to commit, which I find much less dangerous.