On Thu, 12 Mar 1998, Brett McCormick wrote:
>
> What do you all think about the fact that cast(anytype as varchar)
> results in a call to a procedure that is not creatable with 'create
> function'? Perhaps we should re-think our casting implementation,
> maybe one that isn't based on just rewriting itself into a function
> call :) If I wanted to call a function, I would :)
>
> I can, however, do a create function with a different name, then
> update that to varchar. the reason I can't, of course, is because the
> grammar expects varchar(number), not varchar(argument types)..
>
> there was probably a much better way of saying all that :)
>
I agree with you.
Many databases as SOLID and MySQL don't have CAST statement because they
don't need it.
Unfortunately we need a CAST statement to convert data from one to another
type but it is incomplete, seems that CAST can translate only a few types
like:
int to float
float to int
int to text
float to text
We can't CAST a char to a varchar, for example.
It would be interesting al least to have a list of possible conversions.
Ciao, Jose'