Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9052

Re: How to find minimum value?

$
0
0

hi Bobby,

 

if the surgeon checkin formula is something that can be written in sql, consider creating a sql expression that does the group summary. you're using sql server so this should work...there are issues with using oracle doing this as it requires a select statement inside of a sql expression. this isn't officially supported but works in some databases such as sql server, sap hana, access...

 

here's a simple example of some syntax for a sql expression that does a group summary using the xtreme sample database. grouping on the report is by customer name. you need to alias the tables that are in the sql expression (e.g. Orders2) and then reference the report's group table (customer) in the where clause.

 

(

SELECT SUM(`Orders2`.`Order Amount` * `Orders2`.`Order ID`)

FROM   `Customer` `Customer2` INNER JOIN `Orders` `Orders2` ON `Customer2`.`Customer ID`=`Orders2`.`Customer ID`

WHERE  `Customer2`.`Customer ID` = `Customer`.`Customer ID`

)

 

if you use a sql expression to do the group summary, then this expression is available later for a Summary such as minimum.


Viewing all articles
Browse latest Browse all 9052

Trending Articles