Cecil Westerhof wrote: > 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? Isn't Ceil(Value) simply Round(Value + 0.5) ?
- [sqlite] Good way for CEIL, or is there a better way Cecil Westerhof
- [sqlite] Good way for CEIL, or is there a better way OBones
- [sqlite] Good way for CEIL, or is there a better way Michele Pradella
- [sqlite] Good way for CEIL, or is there a better... Cecil Westerhof
- [sqlite] Good way for CEIL, or is there a be... Michele Pradella
- [sqlite] Good way for CEIL, or is there ... Cecil Westerhof
- [sqlite] Good way for CEIL, or is there a be... Stephan Beal
- [sqlite] Good way for CEIL, or is there a better way Darren Duncan