2016-05-09 13:40 GMT+02:00 Michele Pradella <michele.pradella at selea.com>:
> I need to have a CEIL function in SQLite. This is the way I implemented it: >> WITH percentage AS ( >> SELECT date >> , 100.0 * rank / outOf AS percentage >> , CAST(100.0 * rank / outOf AS int) AS castedPercentage >> FROM ranking >> ) >> SELECT date >> , (CASE WHEN percentage = castedPercentage >> THEN castedPercentage >> ELSE castedPercentage + 1 >> END) AS percentage >> FROM percentage >> >> Is this a good way, or is there a better way? >> >> Probably you can create your own function > ?But I want it to be possible for ?everyone? to use the application. People need to implement my function then. Or am I wrong about that? -- Cecil Westerhof