Convert Crosstab access query to DB2 sql query.
Posted on 2006-05-23
My boss has been exporting several tables from our DB2 database into access and running an access wizard to create a Crosstab pivoted report. The access code is this.
TRANSFORM Sum(MM410ITL_INVBAL.IBHAND) AS SumOfIBHAND
FROM MM410ITL_INVBAL INNER JOIN MM410ITL_INVMSTL1 ON MM410ITL_INVBAL.INUMBR = MM410ITL_INVMSTL1.INUMBR
GROUP BY MM410ITL_INVMSTL1.ISTYLN, MM410ITL_INVMSTL1.ISCOLR, MM410ITL_INVBAL.ISTORE
He has asked me to do a direct pull from the DB2 and create the same report. The problem is that the PIVOT keyword is not a valid statement and the above sql breaks. Can anyone help me convert this into a sql command that i can fire at the database and return a record set that will work?
Thanks for any help.