[asterisk-users] Error: 'LENGTH' is not a recognized built-in function name
deepaksingh.rawat at gmail.com
Sun Aug 10 23:20:13 CDT 2014
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 backslash_is_escape
setting in res_odbc.conf maybe we can provide a database_name setting and
drive the query using this setting. If I get time, I will submit a patch
On Mon, Aug 11, 2014 at 8:01 AM, Matthew Jordan <mjordan at digium.com> wrote:
> On Sun, Aug 10, 2014 at 5:02 PM, Deepak Rawat
> <deepaksingh.rawat at gmail.com> wrote:
> > On Mon, Aug 11, 2014 at 3:29 AM, Deepak Rawat <
> deepaksingh.rawat at 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 installed Asterisk again. Now static realtime is
> >> working. Should I file a bug report?
> You're more than welcome to; at the same time, the number of people
> using MS SQL Server with Asterisk is not tremendously high - at least
> when compared with the alternatives. Unfortunately, this is one place
> where making things compatible is problematic: MySQL and PostgreSQL
> (which are far more likely to be used with Asterisk) along with Oracle
> use LENGTH, not LEN.
> Your solution, as it is currently, wouldn't be acceptable, as it would
> cause far more problems than it would solve. About the only way I
> could see solving this would be to make it configurable some place.
> Given the relatively few number of people who use MS SQL Server, I
> wouldn't expect this issue to receive a lot of attention without a
> Matthew Jordan
> Digium, Inc. | Engineering Manager
> 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
> Check us out at: http://digium.com & http://asterisk.org
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the asterisk-users