My stored proc executes 2 SELECT queries :
- one to display the parameters passed to the report by the user
- one that executes the SELECT query passed to the stored proc
So for each report, I call this stored proc and I pass to it the parameters of the report and the "skeleton" of the SQL query so that the stored proc can create both SELECT queries and execute them.
So casting my floating number as CHAR is easy to do because it's part of the SQL query I pass to my stored proc. On the other hand, adding the "SELECT dbr.colstyle" command wouldn't be as easy. In fact, I'd have to change my stored proc so that it accepts the "SELECT dbr.colstyle" command as an optional parameter and executes it if it's present.
Casting as CHAR seems to work so I'll stick to it for the time being.
However, being able to choose the way myDBR rounds floating numbers (in general) might be nice, too.