set delimiter

[expired user #6355]'s profile image [expired user #6355] posted 12 years ago in Feature discussion Permalink
as you already know the character ; is the default delimiter which delimits each SQL query.

but I'd like to set this default to newline character, for instance ("\n") so that i can execute query easily like Toad for oracle.
[expired user #6355]'s profile image [expired user #6355] posted 12 years ago Permalink
anyone knows about it?
ansgar's profile image ansgar posted 12 years ago Permalink
You can set the delimiter to anything but a newline charactersmileIndeed, that's a limitation of the DELIMITER command, which needs a new line at the end to recognize the delimiter.
[expired user #6355]'s profile image [expired user #6355] posted 12 years ago Permalink
unhappyOK, dude. thanks
ansgar's profile image ansgar posted 12 years ago Permalink
Hm, did you know you can run the current query where the cursor is located, via Shift+Ctrl+F9 . That's probably what you need.
matsg's profile image matsg posted 10 years ago Permalink
Follow-up on an old post here, but I just tried setting the delimiter to "go", and unfortunately it matched in the middle of an SQL query, where I created a table called InvoiceCategory. "Cannot create table InvoiceCate", the server responded.

In SQL Server, it is common to create a bunch of statements, delimited with a semicolon, and then use "go" to send it off in one big batch to the server.

I guess this is a bug?
kalvaro's profile image kalvaro posted 10 years ago Permalink
Nope, it's just a different syntax. And, as far as I know, `GO` is not even a standard Transact-SQL feature:

SQL Server provides commands that are not Transact-SQL statements, but are recognized by the sqlcmd and osql utilities and SQL Server Management Studio Code Editor. These commands can be used to facilitate the readability and execution of batches and scripts.



SQL Server Utilities Statements

(BTW, I've always wanted to report it as feature request for the SQL Server support in HeidiSQL and never found the time.)
matsg's profile image matsg posted 10 years ago Permalink
Well, even so, shouldn't I be able to use "go" as a delimiter without it matching in the middle of "InvoiceCategory"?

Please login to leave a reply, or register at first.