Hey everyone!
I have 2 queries. 1 is with data per day:
like this. And this is the sql code:
And then i also have another Query. But here i haddata per hour and i changed it to data per day. (so first there was a tablewith the data per hour and i made another one with data per day)Code:SELECT Tijd.DatumVerbruik, PS_Buggenhout.VerbruikAS PS_Buggenhout_Verbruik FROM Tijd INNER JOIN PS_Buggenhout ON Tijd.Id =PS_Buggenhout.IdVermogen;
But the time field in this query changed to astring. And i want to combine these 2 queries ( i want to devide de first one/the second one) and sort the outcome per day. But because the datafield in thesecond query is now a string this is nog possible and i have an error want Itry to do this.Code:SELECT DISTINCTROWFormat$([Tijd].[DatumVermogen],'dd/mm/yyyy') AS [DatumVermogen per dag],Sum(PS_Buggenhout.idVermogen) AS [Som Van idVermogen]FROM PS_Buggenhout INNERJOIN Tijd ON PS_Buggenhout.[idVermogen] = Tijd.[Id] GROUP BYFormat$([Tijd].[DatumVermogen],'dd/mm/yyyy');
Does anyone have a solution for this.
Thanks!