<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Tim,<br>
<br>
As a followup:<br>
admin:run sql select name from device where name in
('SEP0003E3631350','SEP000B46CAB401','SEP000C3052808C')<br>
name <br>
=============== <br>
SEP0003E3631350 <br>
SEP000B46CAB401 <br>
SEP000C3052808C <br>
<br>
Regards,<br>
Wes<br>
<br>
<br>
On Wednesday, August 12, 2009 6:17:19 PM , Wes Sisk
<a class="moz-txt-link-rfc2396E" href="mailto:wsisk@cisco.com"><wsisk@cisco.com></a> wrote:<br>
<blockquote cite="mid:4A833F6F.2080706@cisco.com" type="cite">
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
this works for me from CLI:<br>
admin:run sql select * from device where name like 'SEP%'<br>
<br>
so this sql syntax works. just need to stuff it into the AXL envelope.<br>
<br>
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.<br>
<br>
/Wes<br>
<br>
On Wednesday, August 12, 2009 4:40:20 PM , Tim Reimers
<a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:treimers@ashevillenc.gov"><treimers@ashevillenc.gov></a>
wrote:<br>
<blockquote
cite="mid:F3B7C0E8920C414E943AFBF3577D95D912A88277@coa-exchange2k3.asheville.local"
type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta content="MSHTML 6.00.6000.16890" name="GENERATOR">
<div><span class="234333120-12082009"><font face="Arial" size="2">Hi
folks --</font></span></div>
<div><span class="234333120-12082009"></span> </div>
<div><span class="234333120-12082009"><font face="Arial" size="2">I'm
trying to work out how to pull some data out of our CM.</font></span></div>
<div><span class="234333120-12082009"><font face="Arial" size="2">Running
6.01sr13</font></span></div>
<div><span class="234333120-12082009"></span> </div>
<div><span class="234333120-12082009"><font face="Arial" size="2">If
you've used the AXL SQL toolkit that comes with UCM 6.01, you've
probably seen this line in 'sample.xml'</font></span></div>
<div><span class="234333120-12082009"></span> </div>
<div><span class="234333120-12082009"><font face="Arial" size="2">"<sql
query="select * from device where name like 'SEP001BD43291E9' "/>"</font></span></div>
<div><span class="234333120-12082009"></span> </div>
<div><span class="234333120-12082009"></span> </div>
<div><span class="234333120-12082009"><font face="Arial" size="2">You
also probably know that this line</font></span></div>
<div><span class="234333120-12082009"></span> </div>
<div><span class="234333120-12082009"><font face="Arial" size="2">"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"<br>
</font></span></div>
<div><span class="234333120-12082009"><font face="Arial" size="2">would
pull out the data for phone SEP001BD43291E9</font></span></div>
<div><span class="234333120-12082009"></span> </div>
<div><span class="234333120-12082009"></span> </div>
<div><span class="234333120-12082009"></span> </div>
<div><span class="234333120-12082009"><font face="Arial" size="2">What
I'm trying to figure out without much success is how to query for a
list of phones.</font></span></div>
<div><span class="234333120-12082009"></span> </div>
<div><span class="234333120-12082009"><font face="Arial" size="2">This
is the full 'sample.xml' file:</font></span></div>
<div><span class="234333120-12082009"></span> </div>
<div><span class="234333120-12082009"><font face="Arial" size="2">"<?xml
version="1.0" encoding="UTF-8"?><br>
<!--DTD generated by XMLSPY v5 rel. 4 U (<a moz-do-not-send="true"
href="http://www.xmlspy.com">http://www.xmlspy.com</a>)--><br>
<!DOCTYPE data [<br>
<!ELEMENT data (sql+)><br>
<!ELEMENT sql EMPTY><br>
<!ATTLIST sql<br>
query CDATA #IMPLIED<br>
update CDATA #IMPLIED<br>
><br>
]><br>
<data><br>
<sql query="select * from device where name like 'SEP001BD43291E9'
"/></font></span></div>
<div><span class="234333120-12082009"><font face="Arial" size="2"></data>"</font></span></div>
<div><span class="234333120-12082009"><font face="Arial" size="2"> </font></span></div>
<div><span class="234333120-12082009"></span> </div>
<div><span class="234333120-12082009"><font face="Arial" size="2">Simply
doing more lines like:</font></span></div>
<div><span class="234333120-12082009"></span> </div>
<div><span class="234333120-12082009"><font face="Arial" size="2"><sql
query="select * from device where name like 'SEP001BD43291E9' "/></font></span></div>
<div><span class="234333120-12082009"><font face="Arial" size="2"><sql
query="select * from device where name like 'SEP001BD445d64 "/></font></span></div>
<div><span class="234333120-12082009"><font face="Arial" size="2"><sql
query="select * from device where name like 'SEP001BD46F3C4' "/></font></span></div>
<div><span class="234333120-12082009"></span> </div>
<div><span class="234333120-12082009"><font face="Arial" size="2">works
-- but there's excess garbage in the resulting XML file.</font></span></div>
<div><span class="234333120-12082009"></span> </div>
<div><span class="234333120-12082009"><font face="Arial" size="2">What
I want to do is something like this:</font></span></div>
<div><span class="234333120-12082009"></span> </div>
<div><span class="234333120-12082009"><font face="Arial" size="2"><sql
query="select * from device where name like 'SEP001BD43291E9' or like
'SEP001BD445d64' or like 'SEP001BD4A3C4B7' "/></font></span></div>
<div><span class="234333120-12082009"></span> </div>
<div><span class="234333120-12082009"><font face="Arial" size="2">But
using "or like" doesn't work.</font></span></div>
<div><span class="234333120-12082009"></span> </div>
<div><span class="234333120-12082009"><font face="Arial" size="2">Nor
does "like" or "," or anything else that I can think of.</font></span></div>
<div><span class="234333120-12082009"></span> </div>
<div><span class="234333120-12082009"></span> </div>
<div><span class="234333120-12082009"><font face="Arial" size="2">I
can't find a reference on Cisco's site for the SQL syntax of the
Informix (?) engine being used.</font></span></div>
<div><span class="234333120-12082009"><font face="Arial" size="2">Other
documents exist, like a data dictionary (handy) --</font></span></div>
<div><span class="234333120-12082009"></span> </div>
<div><span class="234333120-12082009"><font face="Arial" size="2">but
I've not been able to find how to write a simple select query with
multiple matches</font></span></div>
<div><span class="234333120-12082009"></span> </div>
<div><span class="234333120-12082009"><font face="Arial" size="2">I
can do this all day long in MySQL or MSSQL --- but Informix must be
different yet from either of those</font></span></div>
<div><span class="234333120-12082009"></span> </div>
<div><span class="234333120-12082009"><font face="Arial" size="2">Anyone
got any ideas?</font></span></div>
<div><span class="234333120-12082009"></span> </div>
<div><span class="234333120-12082009"></span> </div>
<div><span class="234333120-12082009"></span> </div>
<div><span class="234333120-12082009"></span> </div>
<div><span class="234333120-12082009"></span> </div>
<div> </div>
<div align="left"><font face="Arial" size="2">Tim Reimers</font></div>
<div align="left"><font face="Arial" size="2">Systems Analyst II</font></div>
<div align="left"><font face="Arial" size="2">Information
Technology
Services</font></div>
<div align="left"><font face="Arial" size="2">City of Asheville</font></div>
<div align="left"><font face="Arial" size="2">70 Court Plaza</font></div>
<div align="left"><font face="Arial" size="2">Asheville, NC 28801</font></div>
<div align="left"><font face="Arial" size="2">phone - 828-259-5512</font></div>
<div align="left"><font face="Arial" size="2"><a
moz-do-not-send="true" href="mailto:timreimers@ashevillenc.gov">treimers@ashevillenc.gov</a></font></div>
<div> </div>
<pre wrap=""><hr size="4" width="90%">
_______________________________________________
cisco-voip mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
href="mailto:cisco-voip@puck.nether.net">cisco-voip@puck.nether.net</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://puck.nether.net/mailman/listinfo/cisco-voip">https://puck.nether.net/mailman/listinfo/cisco-voip</a>
</pre>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>