Home Devices
New Blog Posts: Merging Reports - Part 1 and Part 2

SQL Statements in RB v4 and RB v6

edited January 2003 in Devices
Hi,

I was using RB version 4.0. I have upgraded to RB version 6.03. After
opening and saving a report created in RB version 4 in RB version 6 the SQL
gets changed :


Follwing is the SQL in RB4 :

SELECT MASTER.DEPARTMENT, SUM(ABSENCE.DAYS) "SUM",
SUM(ABSENCE.TOTALCOST) "SUM_1" FROM MASTER MASTER INNER JOIN ABSENCE ABSENCE
ON (ABSENCE.STAFFNO = MASTER.STAFFNO) GROUP BY MASTER.DEPARTMENT ORDER BY 2


When this SQL is loaded using RB6, the SQL is changed to :

SELECT MASTER.DEPARTMENT, SUM(ABSENCE.DAYS) SUM_ABSENCE_DAYS,
SUM(ABSENCE.TOTALCOST)SUM_ABSENCE_TOTALCOST FROM MASTER MASTER INNER JOIN
ABSENCE ABSENCE ON (ABSENCE.STAFFNO = MASTER.STAFFNO) GROUP BY
MASTER.DEPARTMENT ORDER BY 3


Due to this I get an entirely different result. In my code there is
statements to change the SQL. This creates me a lots of problems now.
Please give me a solution to avoid this.


Thanks
Rajeev R

Comments

This discussion has been closed.