Export sql query to create as a new table

New user of Toad for Data Analyst.
When trying to export a sql query and create a new table I am getting the error message “Export data Error- The identifier that starts with…is too long. Maximum length is 128.” Any ideas what might be causing this error?
Thank you.

toad error.docx (131 KB)

After you get this message you should get a Summary window. In the left lower corner there is a hyperlink for viewing the logfile. Can you run this again and send me the error log?


Here you go…
barnaby toad error log.txt (3.67 KB)

I am having the Export/Import developer look at this now.

What is your connection type? Oracle, SQL Server, etc. And are you using ODBC to connect or one of th native DB providers in the product?

From the log it looks like you are using the native SQL Server connection and exporting to a new table. Did you fully fill in the details for this? See screenshot. it seems that the next button is enabled and allows you to continue without filling out these items. We can produce a similar error on our end when this data is left out.

Yes, I am using a SQL server connection.
I have also been filling out the required details too.
I have attached the screens that I have completed and am still getting the error.
Thank you for you help.
toad export screen shots.doc (105 KB)

If you are using TDA 2.5 there was an error in running a script to export. It can only use a single SQL statement. Try taking off the “SET QUOTED_IDENTIFIER OFF”.

Or this issue was fixed for TDA 2.6, so you could download and install that version.


I am running version

Also, revised the sql to omit the “SET QUOTED_IDENTIFIER OFF” statement.
(I had included that statement after a search of your knowledge base, in hopes of an answer)

Still producing the error.

What can I do to help solve this?

Thanks very much.

Save the export as a template. Send the template and table DDL to me. (DDL can be grabbed from Script tab of database Browser.

Private mail is fine if you prefer.

Okay. I have looked into this issue. I have good news and bad news…… There is a bug in the code where we are trying to use the SQL statement as the table name. This is what is giving the syntax error. The work around is to export the data to Excel or CSV first and them import into new table. The good news is that this is fixed in TDA 2.7. We also have added a lot of new features to export and import in TDA 2.7. The main reason users try to do what you are doing is to create a table from a query with the correct data types. We have added the following features to the next release. · New table editor in Import (So you can define what column data types you want and primary key)· Auto data type detection of columns for a new table when the data is coming from Excel/csv.· Entering a query from any database type and importing into another database type. TDA 2.7 is starting QA now and will be out sometime in Oct/Nov. Debbie