Re: [asterisk-users] Error: 'LENGTH' is not a recognized built-in function name

2014-08-10 Thread Deepak Rawat
On Mon, Aug 11, 2014 at 3:29 AM, Deepak Rawat deepaksingh.ra...@gmail.com wrote: Hi, I modified the query in res/res_config_odbc.c. Original: SELECT MAX(LENGTH(var_val)) FROM %s WHERE filename='%s' Modified: SELECT MAX(LEN(var_val)) FROM %s WHERE filename='%s' I rebuilt the code and

Re: [asterisk-users] Error: 'LENGTH' is not a recognized built-in function name

2014-08-10 Thread Matthew Jordan
On Sun, Aug 10, 2014 at 5:02 PM, Deepak Rawat deepaksingh.ra...@gmail.com wrote: On Mon, Aug 11, 2014 at 3:29 AM, Deepak Rawat deepaksingh.ra...@gmail.com wrote: Hi, I modified the query in res/res_config_odbc.c. Original: SELECT MAX(LENGTH(var_val)) FROM %s WHERE filename='%s'

Re: [asterisk-users] Error: 'LENGTH' is not a recognized built-in function name

2014-08-10 Thread Deepak Rawat
Thank you for the response Matthew. It makes perfect sense to cater to the majority of databases. The changes I did are custom to our setup so we can use Asterisk 12.4 with MS SQL Server 2012. I wanted to document this error so anyone else facing it could resolve it. Like we have

Re: [asterisk-users] Error: 'LENGTH' is not a recognized built-in function name

2014-08-10 Thread Brian LaVallee
On 8/11/14, 11:31, Matthew Jordan wrote: On Sun, Aug 10, 2014 at 5:02 PM, Deepak Rawat deepaksingh.ra...@gmail.com wrote: On Mon, Aug 11, 2014 at 3:29 AM, Deepak Rawat deepaksingh.ra...@gmail.com wrote: Hi, I modified the query in res/res_config_odbc.c. Original: SELECT

Re: [asterisk-users] Error: 'LENGTH' is not a recognized built-in function name

2014-08-10 Thread Deepak Rawat
I tried that but for some reason couldn't get it working. My custom function was getting created in dbo and the asterisk kept throwing error. Maybe some mistake on my part. I will try it again. On Mon, Aug 11, 2014 at 10:44 AM, Brian LaVallee b.laval...@globaltank.jp wrote: On 8/11/14, 11:31,