Hi Eduardo,
try as Thomas wrote and also try to change into DB the column name 
HOSPITAL ARTIGAS (uppercase) in hospital artigas (lowercase)

google translator:
Hola Eduardo
Por mucho que Thomas escribió y también tratar de cambiar en la base de 
datos de la columna nombre HOSPITAL ARTIGAS (en mayúsculas) en el 
hospital artigas (en minúsculas)

Ciao
Sandro


Il 01/08/2011 10:42, Thomas RAFFIN ha scritto:
> Hi,
>
> I don't understand your e-mail (I only understand English and French)
> but I think DATA should be written like this:
> DATA "the_geom FROM (select * from pais_hospitales WHERE nombre =
> 'HOSPITAL ARTIGAS') as hospital USING UNIQUE gid USING srid=32721"
>
> Indeed with postgreSQL, strings have to be written between simple quotes
> (nombre = 'HOSPITAL ARTIGAS'). So to simplify the DATA line you should
> write it between double quotes.
>
> Thomas
>
> Le 29/07/2011 20:17, Eduardo Bieñkowski a écrit :
>> Lo hice como me enviaste.
>>
>> DATA 'the_geom FROM (select * from "pais_hospitales" WHERE nombre =
>> "HOSPITAL ARTIGAS") as hospital USING UNIQUE gid USING srid=32721'
>>
>> y no funciona me envia esto
>>
>> [29-Jul-2011 15:10:25] PHP Warning:  [MapServer Error]:
>> msPostGISLayerWhichShapes(): Error (ERROR:  no existe la columna «HOSPITAL
>> ARTIGAS»
>> LINE 1: ...lect * from "pais_equipoimagen_pt" WHERE nombre = "HOSPITAL ...
>>
>> Lo hago con comillas simples, tampoco funciona me pone esto
>>
>> DATA 'the_geom FROM (select * from "pais_hospitales" WHERE nombre =
>> 'HOSPITAL ARTIGAS') as hospital USING UNIQUE gid USING srid=32721'
>>
>>
>> [29-Jul-2011 15:12:45] PHP Warning:  [MapServer Error]: loadLayer(): Parsing
>> error near (HOSPITAL):(line 483)
>>    in /var/www/pmapper-4.0/incphp/globals.php on line 60
>>
>> Controlo con psql que funcione y funciona (con comillas simples)
>>
>> geodb=>   select * from pais_hospitales where nombre='HOSPITAL ARTIGAS';
>>
>>    gid | depto | seccion | localidad |      nombre      | ue |
>> calle       | n_mero |     esquina      | telefono | xcoord | ycoord  |
>> metropo | nom_dep | nom_loc | a_p | b_p | c_p | d_p | e_p | a_a | b_a | c_a
>> | d_a | e_a | a_t | b_t | c_t | d_t | e_t | a_c | b_c | c_c | d_c | e_c |
>> a_m | d_m | a_tom | b_tom | c_tom | d_tom | e_tom | a_reso | b_reso | c_reso
>> | d_reso | e_reso | a_d |                      the_geom
>> -----+-------+---------+-----------+------------------+----+-------------------+--------+------------------+----------+---------+---------+---------+---------+---------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-------+-------+-------+-------+-------+--------+--------+--------+--------+--------+-----+----------------------------------------------------
>>     40 |     2 |       1 |       220 | HOSPITAL ARTIGAS | 15 | EDUARDO M.
>> CASTRO |      0 | FRUCTUOSO RIVERA | 47723701 | 551974 | 6636455 |       0 |
>> ARTIGAS | Artigas |   0 |   1 |   1 |   0 |   0 |   0 |   0 |   1 |   0 |
>> 0 |   0 |   1 |   0 |   0 |   0 |   1 |   0 |   0 |   0 |   0 |   0 |   0
>> |     0 |     0 |     0 |     1 |     0 |      0 |      0 |      0 |      0
>> |      0 |   1 | 0101000020D17F0000000000004CD82041000000C0E9505941
>> (1 fila)
>>
>> (END)
>>
>> Supongo que debe ser algún caracter de control que no se cual es.
>> Escucho sugerencias
>> Saludos
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> DATA 'the_geom FROM (select * from "pais_hospitales" WHERE nombre ='
>> HOSPITAL ARTIGAS') as hospital USING UNIQUE gid USING srid=32721'
>>
>>
>>
>>
>>
>> 2011/7/29 Victoria Alvarez<vickyalva...@gmail.com>
>>
>>> La consulta en el .map debería ser algo así:
>>>
>>> DATA 'the_geom FROM (select * from "pais_hospitales" WHERE nombre =
>>> "Hospital Artigas") as hospital USING UNIQUE gid USING srid=32721'
>>>
>>> En el que copiaste falta el primer from
>>>
>>> 2011/7/29 Eduardo Bieñkowski<eduko...@gmail.com>
>>>
>>>> En la base funciona, supongo que debe ser algún caracter de control, no lo
>>>> sé, porque si lo pruebo con campos númericos funciona
>>>>
>>>> DATA 'the_geom from (SELECT * FROM "pais_hospitales" WHERE ue= 15) AS
>>>> subquery USING UNIQUE gid USING srid=32721'
>>>>
>>>> Esto funciona.
>>>> Saludos
>>>>
>>>>
>>>>
>>>> 2011/7/29 Victoria Alvarez<vickyalva...@gmail.com>
>>>>
>>>>> Hola,
>>>>> ¿La consulta directo en la BD funciona? Eso sería lo primero a probar,
>>>>> para ver si es un tema de la sentencia SQL o de sintaxis en el .map
>>>>> No sé como están los datos en la tabla, pero que que los seleccione el =
>>>>> deben coincidir exactamente con lo que escribís. Sino deberías utilizar 
>>>>> LIKE
>>>>> y manejarte con %.
>>>>> Saludos,
>>>>> Vitcoria
>>>>>
>>>>>
>>>>> 2011/7/29 Eduardo Bieñkowski<eduko...@gmail.com>
>>>>>
>>>>>> Estimada
>>>>>> Probe de estas dos maneras el poder ver solo un punto del conjunto de
>>>>>> hospitales
>>>>>>
>>>>>> DATA 'the_geom (select * FROM "pais_hospitales" WHERE nombre = "Hospital
>>>>>> Artigas") as subquery USING UNIQUE gid USING srid=32721'
>>>>>> DATA 'the_geom FROM "pais_hospitales" WHERE nombre = "Hospital Artigas"
>>>>>> USING UNIQUE gid USING srid=32721'
>>>>>>
>>>>>> Que estoy haciendo mal que no logro ver nada??
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Eduardo
>>>>>>
>>>> --
>>>> Eduardo
>>>>
> ------------------------------------------------------------------------------
> Got Input?   Slashdot Needs You.
> Take our quick survey online.  Come on, we don't ask for help often.
> Plus, you'll get a chance to win $100 to spend on ThinkGeek.
> http://p.sf.net/sfu/slashdot-survey
> _______________________________________________
> pmapper-users mailing list
> pmapper-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pmapper-users
>


-- 
Consider the environment. Please don't print this e-mail unless you really need 
to.

This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information.  If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.

Informativa ai sensi del d.lgs. 196/03
Le informazioni contenute nella presente comunicazione e i relativi allegati 
possono essere riservate e sono, comunque, destinate esclusivamente alle 
persone o Società sopraindicati. La diffusione, distribuzione e/o copiatura de 
documento trasmesso da parte di qualsiasi soggetto diverso dal destinatario è 
proibita, sia ai sensi dell'art. 616 c.p. che ai sensi del D. Lgs. n. 196/2003. 
Se avete ricevuto questo messaggio per errore, vi preghiamo di distruggerlo e 
di informarci immediatamente inviando un messaggio al presente indirizzo.


------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Reply via email to