Monday, July 5, 2010

Sum over partition, invalid number

Discoverer reports rearrange the views you create and add new rows to the original "select" for calculations, sums vs. I needed to have a sum calculation in the original sql have the wanted results. So for the first time i used "sum over partition" , example code to sum "column1" for every "column2" change is : select sum (column1) over (partition by column2) from table. If wanted running (cumulative) sum also can be calculated.

SQL have a classic "invalid number" error yet more sometimes Discoverer gives this error though sql does not. Especially while using flexfields number problems occur, usually depending on language (like "." and "," discrepancy). The statement to solve this problem is: fnd_number.canonical_to_number (column1)

No comments:

Post a Comment