Skip to main content
21-Topaz I
June 25, 2019
Question

Query Reports with SQL

  • June 25, 2019
  • 1 reply
  • 3248 views

Last October we upgraded from PDMLink 10.1 to 11.0 and also switched from Oracle to SQL.  Now, many of my reports don't work anymore.  I don't know if it's because of the new version or because of SQL but it's very maddening.

 

On one of my reports I get a message: ERROR: A statement with aggregate function can not be used with access control.

I have no idea what that means.

 

This was a simple report that let me know the last time a user logged in.

I used the Audit Record table.

The Selects are User Name and Event Label.  Then I put a Maximum on Persist Info.Created On.

This last Maximum is the problem but I don't know how to fix it.  Anyone have any ideas?

1 reply

Marco Tosin
21-Topaz I
21-Topaz I
June 25, 2019

Hi Steve,

have you already looked at help guide?

 

Search for database functions.

 

As you will see there are many differences between the same function as written in Oracle or in SQL.

Marco
STEVEG21-Topaz IAuthor
21-Topaz I
June 25, 2019

Thank you Marco.  I will take a look.

Marco Tosin
21-Topaz I
21-Topaz I
June 25, 2019

If your problem is what I think, this idea could be a solution.

 

https://community.ptc.com/t5/Windchill-Ideas/Possibility-to-load-SQL-statements-in-Query-Builder-Report-in/idi-p/460592

 

Knowing the syntax to create an SQL command, you could export the query created with Oracle, adapt it to SQL and import it back into the query builder.

Marco