Liberties with SQL - minor issue

Teradata Studio
Teradata Employee

Liberties with SQL - minor issue

I have a script that generates SQL to COLLECT STATISTICS.

When I highlight the result set and copy it to a scrapbook, it puts " around my commas and makes it unrunnable.  This does NOT happen if I export the result set to a text file, copy it, and then paste it in a scrapbook.

Here's an example:

collect statistics on DEV_P2P_T.P2P_FACT_JU index ( "PO Num "

",""PO Version Num """

...

",""LA Inv Line Nbr """

",""MRC Name """

);

The behavior I get using SQL Assistant and using the export result set is like this:

collect statistics on DEV_P2P_T.P2P_FACT_JU index ( "PO Num "

,"PO Version Num "

...

,"LA Inv Line Nbr "

,"MRC Name "

);

2 REPLIES
Teradata Employee

Re: Liberties with SQL - minor issue

How are you doing the copy from the Teradata Result Set Viewer? The Copy Cells menu option will copy the contents of the cells to the clipboard and you can paste into the SQL Editor. It puts (as default) a comma to separate the cells, but no quotes? You can change the default copy delimiter in the Result Set Viewer preferences

Teradata Employee

Re: Liberties with SQL - minor issue

Got it.  Thanks.