[cisco-voip] SQL question on UCM 6.01

Wes Sisk wsisk at cisco.com
Thu Aug 13 09:20:36 EDT 2009


Hi Tim,

As a followup:
admin:run sql select name from device where name in 
('SEP0003E3631350','SEP000B46CAB401','SEP000C3052808C')
name           
===============
SEP0003E3631350
SEP000B46CAB401
SEP000C3052808C

Regards,
Wes


On Wednesday, August 12, 2009 6:17:19 PM , Wes Sisk <wsisk at cisco.com> wrote:
> this works for me from CLI:
> admin:run sql select * from device where name like 'SEP%'
>
> so this sql syntax works. just need to stuff it into the AXL envelope.
>
> agreed, AXL programming is not exactly nice. so far for me it is not 
> as interoperable or friendly as the Apache documentation would have 
> you believe.
>
> /Wes
>
> On Wednesday, August 12, 2009 4:40:20 PM , Tim Reimers 
> <treimers at ashevillenc.gov> wrote:
>> Hi folks --
>>  
>> I'm trying to work out how to pull some data out of our CM.
>> Running 6.01sr13
>>  
>> If you've used the AXL SQL toolkit that comes with UCM 6.01, you've 
>> probably seen this line in 'sample.xml'
>>  
>> "<sql query="select * from device where name like 'SEP001BD43291E9' "/>"
>>  
>>  
>> You also probably know that this line
>>  
>> "java -cp 
>> .\classes;.\lib\saaj-api.jar;.\lib\saaj-impl.jar;.\lib\mail.jar;.\lib\activation.jar;.\lib\jaxm-api.jar;.\lib\jaxm-runtime.jar;.\lib\xercesImpl.jar;.\lib\xml-apis.jar 
>> AxlSqlToolkit -username=******* -password=******* 
>> -host=<ip-of-publisher> -input=sample.xml -output=sample-response.xml"
>> would pull out the data for phone SEP001BD43291E9
>>  
>>  
>>  
>> What I'm trying to figure out without much success is how to query 
>> for a list of phones.
>>  
>> This is the full 'sample.xml' file:
>>  
>> "<?xml version="1.0" encoding="UTF-8"?>
>> <!--DTD generated by XMLSPY v5 rel. 4 U (http://www.xmlspy.com)-->
>> <!DOCTYPE data [
>>  <!ELEMENT data (sql+)>
>>  <!ELEMENT sql EMPTY>
>>  <!ATTLIST sql
>>  query CDATA #IMPLIED
>>   update CDATA #IMPLIED
>> >
>> ]>
>> <data>
>> <sql query="select * from device where name like 'SEP001BD43291E9' "/>
>> </data>"
>>  
>>  
>> Simply doing more lines like:
>>  
>> <sql query="select * from device where name like 'SEP001BD43291E9' "/>
>> <sql query="select * from device where name like 'SEP001BD445d64 "/>
>> <sql query="select * from device where name like 'SEP001BD46F3C4' "/>
>>  
>> works -- but there's excess garbage in the resulting XML file.
>>  
>> What I want to do is something like this:
>>  
>> <sql query="select * from device where name like 'SEP001BD43291E9' or 
>> like 'SEP001BD445d64' or like 'SEP001BD4A3C4B7' "/>
>>  
>> But using "or like" doesn't work.
>>  
>> Nor does "like" or "," or anything else that I can think of.
>>  
>>  
>> I can't find a reference on Cisco's site for the SQL syntax of the 
>> Informix (?) engine being used.
>> Other documents exist, like a data dictionary (handy) --
>>  
>> but I've not been able to find how to write a simple select query 
>> with multiple matches
>>  
>> I can do this all day long in MySQL or MSSQL --- but Informix must be 
>> different yet from either of those
>>  
>> Anyone got any ideas?
>>  
>>  
>>  
>>  
>>  
>>  
>> Tim Reimers
>> Systems Analyst II
>> Information Technology Services
>> City of Asheville
>> 70 Court Plaza
>> Asheville, NC 28801
>> phone - 828-259-5512
>> treimers at ashevillenc.gov <mailto:timreimers at ashevillenc.gov>
>>  
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> cisco-voip mailing list
>> cisco-voip at puck.nether.net
>> https://puck.nether.net/mailman/listinfo/cisco-voip
>>   
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20090813/e61350c1/attachment.html>


More information about the cisco-voip mailing list