Deepak Rawat
2014-Aug-10 22:02 UTC
[asterisk-users] Error: 'LENGTH' is not a recognized built-in function name
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? > > > On Mon, Aug 11, 2014 at 2:37 AM, Deepak Rawat <deepaksingh.rawat at gmail.com > > wrote: > >> Hi, >> >> I am using Asterisk 12.4 static realtime. I am storing agents.conf >> related data in MS SQL Server 2012 database. But I keep getting *'LENGTH' >> is not a recognized built-in function name* error message. I debugged >> and found that it's due to the changes done in this ticket: >> https://issues.asterisk.org/jira/browse/ASTERISK-23582. As there is no >> LENGTH function in MS SQL Server, therefore, I am getting this error. Is >> this error due to some config issue at my end? >> >> Thank you, >> Deepak >> > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140811/921396c0/attachment.html>
Matthew Jordan
2014-Aug-11 02:31 UTC
[asterisk-users] Error: 'LENGTH' is not a recognized built-in function name
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 patch. -- 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
Seemingly Similar Threads
- Asterisk 12.4 "Agent Busy" message on AgentRequest
- Help With Configuration From Odbc
- [PATCH]: Fix environment variable size restriction in Cygwin version
- Any api (agi/ari/ami) equivalent of "core show calls"?
- [PATCH v2 00/13] drm: Eliminate plane->fb/crtc usage for atomic drivers