Studio Express parsing issue

Teradata Studio
Enthusiast

Studio Express parsing issue

Hi,

 

I was saving my common quries such as check table size, cpu usage, etc.. this kind of quries in a online editor.

If I use sql asistant in windows, there is no problem for me to copy the quries from the online editor directly and run them.

The copy-paste-run is very smooth and no pain.

 

When it comes to studio express for mac, it is a huge pain.

For some unknown reasons, there seem to be unrecognized characters, and these characters cannot be seen by human eyes (or at least by my eys Man Sad ). I have to manually type these queries letter by letter, sometimes it is very time consuming when the query is a big one.

 

Can you guys please check this?


Accepted Solutions
Teradata Employee

Re: Studio Express parsing issue

When you copy from an online editor and paste into the Studio Express editor, do the characters that you see in the online editor appear in the Studio Express editor or do some just not make it?  

 

There is a preference you can set to have the editor display whitespace. In the Preferences dialog, expand the Editors node under the General category and select Text Editors. Try checking the "Show whitespace characters" checkbox. Spaces, tabs and end-of-lines will be shown in light gray. Does anything odd show up there?

 

Could you try running TextEdit, leave TextEdit in Rich Text format, copy from the online editor and paste to the TextEdit? Then select Format/Make Plain Text. Have any characters that were pasted now show as different characters (other than formatting)? If that text looks right, can you then copy the contents of TextEdit and paste them into the Studio Express editor? Does that help?

 

Does the SQL you're copying from the online editor contain any "smart quotes"? Word processors often convert quotation marks (") to smart quotation marks (“) to look better in documents. Apostrophes (') can be converted to smart apostrophes (‘). SQL Assistant converts the smart quotes to straight quotes. Studio Express's editor leaves such characters as they were.

 

If I paste the following:

SELECT ‘String’, ‘string with embedded ‘’ and “quotes”’;

into SQL Assistant, the curly quotes and apostrophes are converted to straight quotes and the query runs. In Studio Express they are left as they are and it shows syntax errors. Could this be the situation you are seeing?

1 ACCEPTED SOLUTION
1 REPLY
Teradata Employee

Re: Studio Express parsing issue

When you copy from an online editor and paste into the Studio Express editor, do the characters that you see in the online editor appear in the Studio Express editor or do some just not make it?  

 

There is a preference you can set to have the editor display whitespace. In the Preferences dialog, expand the Editors node under the General category and select Text Editors. Try checking the "Show whitespace characters" checkbox. Spaces, tabs and end-of-lines will be shown in light gray. Does anything odd show up there?

 

Could you try running TextEdit, leave TextEdit in Rich Text format, copy from the online editor and paste to the TextEdit? Then select Format/Make Plain Text. Have any characters that were pasted now show as different characters (other than formatting)? If that text looks right, can you then copy the contents of TextEdit and paste them into the Studio Express editor? Does that help?

 

Does the SQL you're copying from the online editor contain any "smart quotes"? Word processors often convert quotation marks (") to smart quotation marks (“) to look better in documents. Apostrophes (') can be converted to smart apostrophes (‘). SQL Assistant converts the smart quotes to straight quotes. Studio Express's editor leaves such characters as they were.

 

If I paste the following:

SELECT ‘String’, ‘string with embedded ‘’ and “quotes”’;

into SQL Assistant, the curly quotes and apostrophes are converted to straight quotes and the query runs. In Studio Express they are left as they are and it shows syntax errors. Could this be the situation you are seeing?