HomeActive Query BuilderCTE

CTE


Greetings,

According to the latest news, we can visually build queries with Common Table Expressions. What do I need to do to enable this functionality?

Regards
lafkiotis | email
May 10 2011, 06:45 PM
Hello,

All you need is to set a syntax provider for your database server which has support of CTE. After that you will be able to right-click at the query building area and choose "Add New (or existing) CTE" menu item.

If you need the code to add CTE programmatically, please let me know, what edition of Active Query Builder you are using. In the next minor version we will add this code to the full-featured demo.
Sergey Smagin | email
1 day, 8 hours since original post
Hi Sergey,

Thank you so much for that. Initially, I was using SQL2003SyntaxProvider, but when I changed it to MSSQLSyntaxProvider, I got the additional option on my right click menu to create CTEs.

The issue I've got now though, is that the Properties option is also enabled when I right click on the panel. That brings up a Properties dialog which allows the user to create a statement starting with SELECT INTO..

Is there a way to disable that option as it may potentially alter the underlying data?

Regards,
lafkiotis | email
2 days, 1 hour since original post
Hi Sergey,

Please disregard my previous post. MSSQLSyntaxProvider.setDenyIntoClause() did the trick!

Thanks heaps!

Regards
lafkiotis | email
2 days, 1 hour since original post
This topic is closed