cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

"View as SQL" disabled under query builder

akr
1-Visitor
1-Visitor

"View as SQL" disabled under query builder


Hello All,

I need to generate SQL statements for some existing QML's. For some of QML reports "View as SQL" option is disabled. "View as SQL" is working for OOTB QML files and few custom QML's where limited # of tables used in join.

Is there any constraint on query size to generat SQL statements?

Thanks,

Ashwini

6 REPLIES 6
BenPerry
15-Moonstone
(To:akr)

I generally see this after introducing soft types into the query. Is that what is happening in your situation? There are queries that the UI tool can handle, but SQL cannot. Another example is querying user information. Some is stored in the DB, but most is stored in the LDAP. So the UI tool can handle that interaction whereas straight SQL cannot.

akr
1-Visitor
1-Visitor
(To:BenPerry)

Thanks for your reponse Ben. Yes I have used soft types in the query.. Is there any alternative to generate SQL command for this type of QML's.

BenPerry
15-Moonstone
(To:akr)

I don't think there is a work-around. I have asked PTC tech support a few times. It is just not possible generally, for multiple reasons.

ChrisSpartz
13-Aquamarine
(To:BenPerry)

I found SPR 1758333, which was opened for this same issue. According to the SPR notes, this is intended functionality because soft type queries do not have a direct SQL statement, so the option is disabled.

Marco_Tosin
21-Topaz I
(To:akr)

LoriSood
22-Sapphire III
(To:akr)

As a last resort you can always enable wt.pom.stacktrace logging to get the SQL queries run when a report is executed. However, this will output A LOT of query information and is cumbersome to go through. A possible reason for the SQL query not being generated is due to multiple queries having to be run and potential Info*Engine tasks having to be executed in order to get the data for the report.

Announcements


Top Tags