<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2802" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>Hi <FONT face="Times New Roman" 
size=3>Prema,</FONT></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Did you tried to add field name in the 
URL?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><A 
href="http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/zap/htdocs/CountryOrcl.map&amp;mode=itemnquery&amp;layer=world_poly&amp;qlayer=world_poly&amp;qitem=cntry_name&amp;qstring='india'"><STRONG>http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/zap/htdocs/CountryOrcl.map&amp;mode=itemnquery&amp;layer=world_poly&amp;qlayer=world_poly&amp;qitem=cntry_name&amp;qstring='<FONT 
color=#ff0000>CNTRY_NAME</FONT>=india</STRONG><FONT face=Arial 
size=2>'</A></FONT><BR></DIV>
<DIV><FONT face=Arial size=2>I also think you should add this field name into 
your layer definition:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV>DATA "shape,cntry_name FROM world USING SRID 8307"</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Regards</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Francesco</FONT></DIV></FONT></DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=lists@NABBLE.COM href="mailto:lists@NABBLE.COM">Prema Selvam (sent by 
  Nabble.com)</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A 
  title=MAPSERVER-USERS@LISTS.UMN.EDU 
  href="mailto:MAPSERVER-USERS@LISTS.UMN.EDU">MAPSERVER-USERS@LISTS.UMN.EDU</A> 
  </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, January 18, 2006 4:56 
  PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> [UMN_MAPSERVER-USERS] Problem in 
  Oracle Spatial with MapServer in ItemnQuery</DIV>
  <DIV><BR></DIV>Hi All, <BR><BR>&nbsp;Thanks all for the solution of my 
  previous query ( Problem in Oracle Spatial Connection - Empty Image). 
  <BR><BR>&nbsp;Now I got new query, Please give me some solution. 
  <BR><BR>&nbsp;I am able to establish connection between MapServer and Oracle 
  Spatial 10g, and we can get the Map Image prefectly ( refer Subject <I>Problem 
  in Oracle Spatial Connection - Empty Image</I>) <BR><BR>&nbsp;I am unable to 
  get the any <B>Query </B>&nbsp;Function in MapServer with Oracle Spatial , but 
  i can able to do the query operation with Shapefiles. <BR><BR>&nbsp;The 
  Mapfile, quey and Error is give below, <BR><BR><B>Mapfile</B> <BR><BR>&nbsp; 
  &nbsp; &nbsp; &nbsp; MAP <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; DEBUG ON <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  NAME &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; World_Country <BR>&nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EXTENT &nbsp; &nbsp; &nbsp; &nbsp;-180 -90 
  180 83.60415649414 <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  SIZE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 800 400 <BR>&nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SHAPEPATH &nbsp; &nbsp; 
  &nbsp;'/ms4w/apps/zap/data/' <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; IMAGETYPE &nbsp; &nbsp; &nbsp;GIF <BR>&nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; STATUS &nbsp; &nbsp; &nbsp; ON 
  <BR><BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WEB <BR>&nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  TEMPLATE &nbsp; &nbsp; 'templates/ZapTemp.html' <BR>&nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IMAGEPATH 
  &nbsp; &nbsp;'/ms4w/tmp/ms_tmp/' <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IMAGEURL &nbsp; &nbsp; '/ms_tmp/' 
  <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; END <BR><BR>&nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PROJECTION <BR>&nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  "proj=latlong" <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; "ellps=WGS84" <BR>&nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; END <BR><BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; QUERYMAP <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; STATUS ON <BR>&nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; STYLE HILITE 
  <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; COLOR 255 255 0 <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; END <BR><BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; LAYER <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; DEBUG ON <BR><BR>&nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PROJECTION <BR>&nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; "proj=latlong" <BR>&nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; "ellps=WGS84" <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; END <BR><BR>&nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CONNECTIONTYPE 
  oraclespatial <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; CONNECTION "world/land@orcl" <BR>&nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DATA 
  "shape FROM world USING SRID 8307" <BR><BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NAME &nbsp; &nbsp; &nbsp; 
  &nbsp; world_poly <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; STATUS &nbsp; &nbsp; &nbsp; ON <BR>&nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TYPE 
  &nbsp; &nbsp; &nbsp; &nbsp; POLYGON <BR><BR><BR>&nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DUMP TRUE 
  <BR><BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; TEMPLATE "templates/ZapTemp.html" <BR><BR>&nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TOLERANCE 5 
  <BR><BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; CLASS <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NAME 
  &nbsp;'The_World' <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; STYLE <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; COLOR &nbsp; &nbsp;0 200 0 <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  END <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; END <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  END <BR>&nbsp; &nbsp; &nbsp; &nbsp; END <BR><BR><BR><B>Query</B> <BR><BR><B><A 
  href="http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/zap/htdocs/CountryOrcl.map&amp;mode=itemnquery&amp;layer=world_poly&amp;qlayer=world_poly&amp;qitem=cntry_name&amp;qstring=india" 
  target=_top 
  rel=nofollow>http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/zap/htdocs/CountryOrcl.map&amp;mode=itemnquery&amp;layer=world_poly&amp;qlayer=world_poly&amp;qitem=cntry_name&amp;qstring=india</A></B> 
  <BR><BR><BR><B>Error Message</B> <BR><BR>msOracleSpatialLayerWhichShapes(): 
  OracleSpatial error. Error: ORA-00920: invalid relational operator . Query 
  statement: SELECT rownum, cntry_name, shape FROM world WHERE india AND 
  SDO_FILTER( shape, MDSYS.SDO_GEOMETRY(2003, 8307, 
  NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(-180,-90,180,83.6041565) 
  ),'querytype=window') = 'TRUE' . Check your data statement. <BR><BR><B>Spatial 
  data in Oracle</B> <BR><BR>SQL&gt; describe world <BR><BR>&nbsp;Name &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Null? &nbsp; &nbsp;Type 
  <BR>&nbsp;----------------------------------------- -------- 
  ---------------------------- <BR><BR>&nbsp;SHAPEID &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; NOT NULL NUMBER(38) <BR>&nbsp;FIPS_CNTRY &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VARCHAR2(2) <BR>&nbsp;GMI_CNTRY 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp;VARCHAR2(3) <BR>&nbsp;ISO_2DIGIT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; VARCHAR2(2) <BR>&nbsp;ISO_3DIGIT &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VARCHAR2(3) 
  <BR>&nbsp;CNTRY_NAME &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; VARCHAR2(254) <BR>&nbsp;LONG_NAME &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;VARCHAR2(40) <BR>&nbsp;SOVEREIGN &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;VARCHAR2(40) 
  <BR>&nbsp;POP_CNTRY &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp;NUMBER <BR>&nbsp;CURR_TYPE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;VARCHAR2(16) <BR>&nbsp;CURR_CODE &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;VARCHAR2(4) 
  <BR>&nbsp;LANDLOCKED &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; VARCHAR2(1) <BR>&nbsp;SQKM &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NUMBER <BR>&nbsp;SQMI &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NUMBER 
  <BR>&nbsp;COLORMAP &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; NUMBER <BR>&nbsp;SHAPE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MDSYS.SDO_GEOMETRY 
  <BR><BR><BR>&nbsp;Please give me a some solution <BR><BR>&nbsp;Waiting for the 
  reply <BR><BR>Thanks &amp; Regards, <BR>Prema Selvam <BR>GISbiz <BR><BR><BR>
  <HR align=left width=300>
  View this message in context: <A 
  href="http://www.nabble.com/Problem-in-Oracle-Spatial-with-MapServer-in-ItemnQuery-t945593.html#a2449588">Problem 
  in Oracle Spatial with MapServer in ItemnQuery</A><BR>Sent from the <A 
  href="http://www.nabble.com/Mapserver---User-f1215.html">Mapserver - User</A> 
  forum at Nabble.com. </BLOCKQUOTE></BODY></HTML>