|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-08-10 : 09:43:44
|
| oranthor writes "I am not an expert at SQL, I can do the minor lookups and such... Anyway I need to convert this Access Query (CrossTab?/PIVOT?) to SQL. I have not been able to get it to work as of yet. I have gotten as far as getting the right rows and columns but haven't been able to get the data correct.Access Query:PARAMETERS <forms]!Reporting![CurrentDay> DateTime; TRANSFORM Sum(Extracts.Cash) AS SumOfCashSELECT Extracts.UnitFROM Units INNER JOIN Extracts ON Units.Desig = Extracts.UnitWHERE (((DateDiff("d",[Date],[forms]![Reporting]![CurrentDay]))<30) AND ((Units.StoreStatus) In (3,4)) AND ((Extracts.Type) ="M" ))GROUP BY Extracts.UnitPIVOT DateDiff("d",[Date],forms!Reporting!CurrentDay) In (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29);Any help would be greatly appreciated!! I have read through the BOL and Access articles, but having problems..." |
|