Toad World® Forums

Teradata support and QUALIFY keyword


#1

Looks like Toad doesn’t recognize the QUALIFY clause of Teradata’s SQL flavour and when I apply formating to the SQL statement it’s considered as part of the previous one, also the semicolumn of the statement gets removed.
Ex.

SQL1 …;

SQL2 with qualify;

SQL3 …;

After applying format:

SQL1…;SQL2

SQL3;

Using TDP 3.2


#2

Thanks for reporting the issue. CR106671 is created.


#3

So far I was able to reproduce the issue partially. A statement with qualify is not formatted at all. I created CR 106672 to track the issue.
But I don’t see the other ones.
For me :

SQL1 has been formatted.

SQL2 with qualify stays as is and it does not attached to the previous one. Semicolon is not removed.

SQL2 has been formatted.

Could you please provide more information so we will be able to reproduce and address the issues?


#4

I’ve attached screenshots. Please notice the “QUALIFY” keyword is not colored in blue, hence not recognized as a keyword.

Message was edited by: veskojl
tdp_formater_after.png


#5

I’ve attached screenshots. Please notice the “QUALIFY” keyword is not colored in blue, hence not recognized as a keyword.

Message was edited by: veskojl
tdp_formater_before.png


#6

Thank you for the screenshots.
I see the issue but still cannot reproduce it.
What format type do you use?
Have you customized it?


#7

I’m using the default format and haven’t customized it.


#8

I tried it using the Teradata .Net connection and while I didn’t get error mentioned in the OP, it did present a syntax error at the word “partition.”

Along those same lines, the SQL Formatter tends to throw syntax errors when processing create/replace statements as well.

I’m currently using the 3.3 Beta, but I have seen this in 3.2 also.