Toad for MySQL Forum - Toad for MySQL - Toad World

Toad for MySQL Forum

Community Discussion

Danny Torres
Follow / 1 Nov 2016 at 1:57pm / Toad for MySQL

We are now on Twitter!!! Contact a Technical Support expert today...

Expand content
Do you have a quick support question and short of time? Contact us Via Twitter @ QuestExperts and we will take care of you. #Jointheinnovation #WeareQuest

Do you have a quick support question and short of time? Contact us Via Twitter  @QuestExperts and we will take care of you. #Jointheinnovation #WeareQuest

303 0 / Create an account to join the discussion.
Aaron Lil
Follow / 8 Dec 2016 at 5:23pm / Toad for MySQL

Excessive spacing when using formatter

Expand content
I'm facing an issue with excessive spacing between selected columns list and its aliases when formatting the SQL. I've already searched on every option in settings but I couldn't find a fix...

I'm facing an issue with excessive spacing between selected columns list and its aliases when formatting the SQL.

I've already searched on every option in settings but I couldn't find a fix for that.

Below is an example of SQL:
Before format:
SELECT CASE WHEN t.columncase = 0 THEN 1 WHEN t.columncase = 1 THEN -1 END AS total, t.col1 AS column1, t.col2 AS column2, t.col3 AS column3, t.col4 AS column4, t.col5 AS column5, t.col6 AS column6
FROM table t

After format:


How it should be:


I'm using these formatter settings:
<FormatterOptions>
<Version>252</Version>
<LegacyOptionsGUI>5.290.0</LegacyOptionsGUI>
<QP5>5.295</QP5>
<RightMargin>150</RightMargin>
<VarDeclAlignment>0</VarDeclAlignment>
<ParamDeclAlignment>0</ParamDeclAlignment>
<PassedParamAlignment>0</PassedParamAlignment>
<CommaStyle>2</CommaStyle>
<AndOrOperatorPos>2</AndOrOperatorPos>
<ParenthesizedQueryAsBlock>1</ParenthesizedQueryAsBlock>
<GroupByArrangement>W</GroupByArrangement>
<OrderByArrangement>W</OrderByArrangement>
<ColumnArrangement>W</ColumnArrangement>
<ExprArrangeOnCol>99</ExprArrangeOnCol>
<DmlKeywordsLeftAligned>1</DmlKeywordsLeftAligned>
</FormatterOptions>

Could someone help please?

Thanks.

Unanswered 31 0 / Create an account to join the discussion.
billc63
Follow / 2 Apr 2014 at 10:53am / Toad for MySQL
Latest post by on 4 Dec 2016 at 8:07pm

SQL Script formatting

Expand content
I have installed Toad For MYSQL 7.0.0.2038 and I am experiencing a problem with SQL formatting Toad puts all my SQL into one line. When I open a VIEW and go to the Script tab my SQL appears as in the...

I have installed Toad For MYSQL 7.0.0.2038 and I am experiencing a problem with SQL formatting

Toad puts all my SQL into one line.

When I open a VIEW and go to the Script tab my SQL appears as in the sample below.

CREATE VIEW  `database`.`table_v` AS select `field`.`id` AS `id`,`field`.`user_id` AS `user_id`,`ua`.`display_name` AS `display_name`,`field`.`user_type_id` AS `user_type_id`,`uta`.`name` AS `user_type`,`field`.`source_id` AS `source_id`,`tst`.`name` AS `source`,`field`.`author_id` AS `author_id`,(case when (`field`.`user_type_id` = 1) then `ua`.`display_name` when (`field`.`user_type_id` = 2) then `taa`.`name` else `ua`.`display_name` end) AS 'author'

When I use Notepad or NaviCat my SQL appears as

CREATE VIEW table_v AS

SELECT

field.id,
field.user_id,
ua.display_name,
field.user_type_id,
uta.name AS user_type,
field.source_id,
tst.name AS source,
field.author_id,

CASE
      WHEN field.user_type_id = 1
      THEN ua.display_name
      WHEN field.user_type_id = 2
      THEN taa.name
      ELSE ua.display_name
END AS author,

Toad has managed to convert SELECT, CASE, WHEN, THEN, ELSE and END to lower case. It has also added '' around object names and added AS 

I would like Toad to display the SQL as it appears in Navicat and notepad. I have altered Editor settings to no avail. 

Can anybody shed any light on How to do this?

Many thanks,

Bill

10398 1 / Create an account to join the discussion.
Guy_M
Follow / 16 Feb 2011 at 11:56am / Toad for MySQL
Latest post by on 4 Dec 2016 at 8:02pm

Format SQL in script editor doesn't work with "non SELECT"...

Expand content
Hi, I don't know if it's a bug or if I miss something. The "Format SQL" command works fine with SELECT script (like SELECT FROM WHERE) but doesn't work with other SQL script (like...

Hi,

I don't know if it's a bug or if I miss something.

The "Format SQL" command works fine with SELECT script (like SELECT FROM WHERE) but doesn't work with other SQL script (like CREATE/ALTER VIEW ... AS SELECT ...).

It's very annoying when I have to alter a view with a huge SELECT statement.

I hope that help
Guy
PS: please apologize my poor English.

10742 2 / Create an account to join the discussion.
Guy_M
Follow / 9 May 2012 at 4:55pm / Toad for MySQL
Latest post by on 4 Dec 2016 at 7:59pm

Editor formatter seems to not work

Expand content
Hi, I wrote this sample of code in the editor : SELECT @OneVar; -- A comment CALL OneProc(); then I apply the editor formatter (default) I get this SELECT @OneVar;-- A commentCALL OneProc(); It's seems...

Hi,

I wrote this sample of code in the editor :
SELECT @OneVar;
-- A comment
CALL OneProc();

then I apply the editor formatter (default) I get this
SELECT @OneVar;-- A commentCALL OneProc();

It's seems there is a bug or I put a wrong option in the formatter, which one ?

Best regards
Guy

10558 1 / Create an account to join the discussion.
Yoni Sade
Follow / 23 Nov 2016 at 8:37am / Toad for MySQL
Latest post by on 4 Dec 2016 at 7:50pm

Formatter breaks on "LIMIT" clause with variables

Expand content
Tried formatting stored procedure code which has a query with "LIMIT v_param1,v_param2" syntax, and it breaks because of the variables. Using Toad for MySQL 7.9.0.637

Tried formatting stored procedure code which has a query with "LIMIT v_param1,v_param2" syntax, and it breaks because of the variables.

Using Toad for MySQL 7.9.0.637

153 1 / Create an account to join the discussion.
Valerie Cahill
Follow / 29 Nov 2016 at 10:26pm / Toad for MySQL
Latest post by on 30 Nov 2016 at 3:51pm

Tutorial on how to learn Toad

Expand content
Hi Can anybody please tell me where I can get step by step instrusction on how to operate Toad , learn how to use toad to build queries and save views etc. Nothing is working for me. I have learned some...

Hi Can anybody please tell me where I can get step by step instrusction on how to operate Toad , learn how to use toad to build queries and save views etc. Nothing is working  for me. I have  learned some MySQL but nothing working for me?

187 2 / Create an account to join the discussion.
desai.mayank
Follow / 30 Nov 2016 at 7:34am / Toad for MySQL

Issue in adding file from "import wizard".

Expand content
Hi, When I click on Add File option in Import Wizard(Send to ->Import Wizard->Add Files) it simply grayed out . Nothing happened. Add file pop-up is not opening. Please help!!!

Hi,

When I click on Add File option in Import Wizard(Send to ->Import Wizard->Add Files)  it simply grayed out . Nothing happened. Add file pop-up is not  opening.

Please help!!!

Unanswered 83 0 / Create an account to join the discussion.
yonisade
Follow / 1 Nov 2016 at 9:46pm / Toad for MySQL
Latest post by on 5 Nov 2016 at 12:48am

Trying to save options gives error "Object reference not set...

Expand content
For example, try changing "show line numbers" in editor options and click "Apply". I'm using v7.9.0.637

For example, try changing "show line numbers" in editor options and click "Apply".

I'm using v7.9.0.637

396 1 / Create an account to join the discussion.
Yoni Sade
Follow / 3 Nov 2016 at 1:54pm / Toad for MySQL
Latest post by on 5 Nov 2016 at 12:45am

BUG: Group Execute error - "Lookup Error - MySQL Database Error...

Expand content
Even though I've selected databases across different servers, I'm getting error when trying to group execute the SQL script: "Lookup Error - MySQL Database Error: No database selected"...

Even though I've selected databases across different servers, I'm getting error when trying to group execute the SQL script:

"Lookup Error - MySQL Database Error: No database selected"

After that, the "Execute Scripts" button is stuck as a red stop circle, until I cancel the "Group Execute" option by clicking on its green double green arrow button.

After doing that, I'm not able to mark the "Group Execute" checkbox in the vertical "Group Execute" tab on the left side of the editor.

I'm using Toad for MySQL 7.9.0.637.

356 1 / Create an account to join the discussion.
DoubleSpeed
Follow / 12 Sep 2015 at 7:10am / Toad for MySQL
Latest post by on 1 Nov 2016 at 9:01am

Out of memory exception?

Expand content
Hi, I'm trying to open a mysql file however it keeps failing as with an out of memory exception error, how can I resolve this?

Hi,

I'm trying to open a mysql file however it keeps failing as with an out of memory exception error, how can I resolve this?

Unanswered 2503 1 / Create an account to join the discussion.
JoWaKi
Follow / 28 Oct 2016 at 2:37pm / Toad for MySQL
Latest post by on 31 Oct 2016 at 7:54am

Large tables compare

Expand content
Hello, I would like to know if i could use a where clause for compare. Each time when i import new records It compares over 2 million existing records.

Hello, I would like to know if i could use a where clause for compare. Each time when  i import new records It compares over 2 million existing records. 

488 2 / Create an account to join the discussion.
romber
Follow / 9 Oct 2016 at 7:22am / Toad for MySQL
Latest post by on 29 Oct 2016 at 2:03am

how to cancel the pop up of table hint?

Expand content
a new feature was added in the new release(7.9.0.637),that is table hint,in the release note,there is a describe of this feature: In the Editor, you can place the cursor over a table name in a SQL...

a new feature was added in the new release(7.9.0.637),that is table hint,in the release note,there is a describe of this feature:

  • In the Editor, you can place the cursor over a table name in a SQL statement to display the list of columns in the table.

BUT, i really do not want this feature, is there anyway to forbid this?

780 4 / Create an account to join the discussion.
mikelust
Follow / 27 Oct 2016 at 9:38pm / Toad for MySQL

schema compare: foreign keys have empty options

Expand content
MySQL schema compare finds different foreign keys, but displays them with missing constraint name and column lists. For example: ALTER TABLE `x`.`y` ADD CONSTRAINT `(` FOREIGN KEY() REFERENCES ``();

MySQL schema compare finds different foreign keys, but displays them with missing constraint name and column lists.   For example:

ALTER TABLE `x`.`y`
ADD CONSTRAINT `(` FOREIGN KEY() REFERENCES ``();

345 0 / Create an account to join the discussion.
Kalle L
Follow / 26 Apr 2012 at 9:10pm / Toad for MySQL
Latest post by on 27 Oct 2016 at 1:59am

Can not open SQL files while connected

Expand content
I have recently discovererd toad and I am very impressed so far. I have however one problem: Toad hangs if I open a SQL file while I have an active connection. If I open the SQL file before i open the...

I have recently discovererd toad and I am very impressed so far.

I have however one problem: Toad hangs if I open a SQL file while I have an active connection. If I open the SQL file before i open the connection to the database server, it works OK.

I spent some time googling about this problem, but have'nt found anything. Does anyone have any suggestions?

I am using Toad 6.3.0.642 on Windows 7 Ultimate 64-bit.  

16345 16 / Create an account to join the discussion.
mashley806
Follow / 26 Oct 2016 at 11:28pm / Toad for MySQL

Object reference not set to an instance of an object. - Data Comp...

Expand content
Hi, When comparing data between two different data sources using Tools > Compare > Data Compare after walking through the wizard the error appears Object reference not set to an instance of an...

Hi,

When comparing data between two different data sources using Tools > Compare > Data Compare after walking through the wizard the error appears Object reference not set to an instance of an object. Toad for MySQL Version 7.9.0.537 Please see screenshot below.

.

I've seen this error occur executing other actions in verion 7.9.0.637. Haven't seen this error in previous versions. For example in this post: http://www.toadworld.com/products/toad-for-mysql/f/22/t/31319

Thanks for your consideration.
Matt

347 0 / Create an account to join the discussion.
Pradhisha22
Follow / 25 Oct 2016 at 6:07am / Toad for MySQL

Connect Eclipse and Toad(Import)

Expand content
Hi all I am importing excel sheets with n no of rows and n no of columns into the database table using toad import option. now i need to write a code in java to import. i.e evrything should be in front...

Hi all

I am importing excel sheets with n no of rows and n no of columns into the database table using toad import option. now i need to write a code in java to import. i.e evrything should be in front end. In JSP(front end), I need to select a file  and database table's name then click upload button. dats it. toad should run its import option in the backend and update all data in database. Is it possible for an external software like eclipse to connect to toad's import option? Is import loader is stand alone?

P.S- i am using Toad for MySQL

Any other opinions to solve my issue is also welcome

368 0 / Create an account to join the discussion.
bablam
Follow / 14 Oct 2016 at 2:17pm / Toad for MySQL
Latest post by on 21 Oct 2016 at 6:26pm

Waiting for Connection

Expand content
Hi, If I have not used an Editor Window for a while (say > 3-5 min), when I submit a new query, the first two times it always returns "Execution Finished in..." after showing "Executing...

Hi,

If I have not used an Editor Window for a while (say > 3-5 min), when I submit a new query, the first two times it always returns "Execution Finished in..." after showing "Executing Script: Waiting for Connection" for a while - and always - only on the third time, does it execute the script. I use other interfaces, including phpMyAdmin and others that do not behave this way at all, so this seems particular to Toad MySQL, or at least the way it is setup in my case. 

If you have also encountered this and/or have any ideas on what could be causing this behavior and how to fix it, I would appreciate a response.

Thanks for your help.

Best,

mdb

Unanswered 739 4 / Create an account to join the discussion.
Tomassino
Follow / 18 Oct 2016 at 5:21pm / Toad for MySQL

Restore database

Expand content
Hi all! I have back up with *.bak extension and I want to restore it on my local machine. I haven't fount any guides how to do that in Toad and start an MySQL server, so I could easily connect...

Hi all!

I have back up with *.bak extension and I want to restore it on my local machine. I haven't fount any guides how to do that in Toad and start an MySQL server, so I could easily connect to it from my local server.

Can anyone provide steps?

Thanks in advance. 

Unanswered 464 0 / Create an account to join the discussion.
Kariadill
Follow / 3 Apr 2013 at 2:10pm / Toad for MySQL
Latest post by on 8 Oct 2016 at 3:07am

Unable to load file

Expand content
In the Data Import wizard I can select a range in a xlsx format excel file but when I highlight and accept the input range, I get, "error reading from data file, check the file format and file encoding"...

In the Data Import wizard I can select a range in a xlsx format  excel file but when I highlight and accept the input range, I get, "error reading from data file, check the file format and file encoding" "Unable to Loadfile".

Grateful if someone would help me on working through this.

I am a total newbie and have so far just created a new database with the above as first step undertaken.

12391 3 / Create an account to join the discussion.