[SR-Users] permissions module db
Daniel Tryba
d.tryba at pocos.nl
Thu May 11 10:19:08 CEST 2017
On Wed, May 10, 2017 at 06:54:49PM +0000, David Villasmil wrote:
> I don't think I can... there's no cast to smallint :(
Indeed, but take a look at this workaround with a custom function
returning a smallint:
http://ask.brothersoft.com/how-to-convert-from-int-to-smallint-86641.html
(which contains an obviuos error). But using the custom function in a
view works:
create view testSI as select convToSmallInt(anint) from testT;
select * from testSI;
+-----------------------+
| convToSmallInt(anint) |
+-----------------------+
| 123 |
| 432 |
| 5344 |
| 32767 |
+-----------------------+
4 rows in set, 1 warning (0.00 sec)
More information about the sr-users
mailing list