[sqlite] decimal function not found

9 views
Skip to first unread message

YAN HONG YE

unread,
Mar 21, 2012, 12:20:16 AM3/21/12
to sqlite...@sqlite.org
my sqlite sql sentens is :
"select '888888', Convert(decimal(5,1),AVG(qph))"
but build the project in c shows the error:
Error: no such function: decimal
how to process this problem?
_______________________________________________
sqlite-users mailing list
sqlite...@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Roger Binns

unread,
Mar 21, 2012, 12:22:59 AM3/21/12
to General Discussion of SQLite Database
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 20/03/12 21:20, YAN HONG YE wrote:
> my sqlite sql sentens is : "select '888888',
> Convert(decimal(5,1),AVG(qph))"

The list of supported functions supplied with SQLite is here:

http://www.sqlite.org/lang_corefunc.html

You can add your own functions using this API:

http://www.sqlite.org/c3ref/create_function.html

It looks like the closest to what you want is the round() builtin.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk9pV6MACgkQmOOfHg372QRvKgCgy7m+Q/914E77+bNX1yUOYyrg
iG0AoJoT5XlN5YWt2O7PGDCaoQAVl/d1
=KdaJ
-----END PGP SIGNATURE-----

Reply all
Reply to author
Forward
0 new messages