diff --git a/src/Ringo/Generator/Populate/Fact.hs b/src/Ringo/Generator/Populate/Fact.hs index c3a2712..b68fe28 100644 --- a/src/Ringo/Generator/Populate/Fact.hs +++ b/src/Ringo/Generator/Populate/Fact.hs @@ -125,8 +125,8 @@ factTablePopulateSQL popMode fact = do timeUnitColumnInsertSQL cName = let colName = timeUnitColumnName dimIdColName cName settingTimeUnit in ( colName - , "extract(epoch from " <> fullColumnName fTableName cName <> ")::bigint/" - <> Text.pack (show $ timeUnitToSeconds settingTimeUnit) + , "floor(extract(epoch from " <> fullColumnName fTableName cName <> ")/" + <> Text.pack (show $ timeUnitToSeconds settingTimeUnit) <> ")::bigint" , True ) dimIdColumnInsertSQL cName =