Hi Noli,<br>this one it's no a plugin error, it's a query syntax error.<br><div class="gmail_quote">On Thu, Dec 16, 2010 at 5:33 AM, Noli Sicad <span dir="ltr"><<a href="mailto:nsicad@gmail.com">nsicad@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Select * from Regions where NAME = "VENETO"<br></blockquote><div>You still use double quotes wrapping values, instead you must use single quotes.<br>
Double quotes are for identifiers like table name, schema name and column name.<br><br>Cheers.<br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div class="h5">
On 12/16/10, Noli Sicad <<a href="mailto:nsicad@gmail.com">nsicad@gmail.com</a>> wrote:<br>
> Hi Ricardo,<br>
><br>
> In postgis error.<br>
><br>
> The plugin has the same problem when you checkbox is on for "save new<br>
> layer to database".<br>
><br>
> However, if I unchecked it this is the error.<br>
><br>
> ~~~~~~~~~~~~<br>
><br>
> Unable to execute the query.<br>
> The error message from the database was:<br>
> ERROR: column "A" does not exist<br>
> LINE 1: ...ect * from (Select * from stands where veg_type = "A") as "s...<br>
> ^<br>
> .<br>
> SQL: select * from (Select * from stands where veg_type = "A") as<br>
> "subQuery_0" limit 1<br>
><br>
><br>
> Noli<br>
><br>
><br>
><br>
><br>
> On 12/16/10, Noli Sicad <<a href="mailto:nsicad@gmail.com">nsicad@gmail.com</a>> wrote:<br>
>> Hi Ricardo,<br>
>><br>
>> Spatialite database bug.<br>
>><br>
>> The bug is in checkbox (on./check) "save new layer to database".<br>
>><br>
>> When I unchecked (off), it works but the resulting map in TOC is "sql<br>
>> layer".<br>
>><br>
>><br>
>><br>
>> The postgis bug, I don't know the reason since it does not work as<br>
>> well in the other postgis plugin (i.e PGManager).<br>
>><br>
>> Noli<br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> On 12/16/10, Ricardo Filipe Soares Garcia da<br>
>> <<a href="mailto:ricardo.garcia.silva@gmail.com">ricardo.garcia.silva@gmail.com</a>> wrote:<br>
>>> Hi Noli<br>
>>><br>
>>> I can't seem to reproduce any of your errors with my sample data.<br>
>>> Can you give me some more information? What queries are you trying?<br>
>>> Is it possible for you to send me some testing data?<br>
>>><br>
>>> On Thu, Dec 16, 2010 at 1:47 AM, Noli Sicad <<a href="mailto:nsicad@gmail.com">nsicad@gmail.com</a>> wrote:<br>
>>>> Hi Ricardo,<br>
>>>> .<br>
>>>> I got another error in 0.4, this time in PostGI. This is simple query.<br>
>>>><br>
>>>> Select * from stands where veg_type = "A"<br>
>>>><br>
>>>> ~~~~~~~~~<br>
>>>> An error has occured while executing Python code:<br>
>>>><br>
>>>> Traceback (most recent call last):<br>
>>>> File<br>
>>>> "/home/noli/.qgis/python/plugins/customdbquery/CustomDBQueryDialog.py",<br>
>>>> line 175, in parse_SQL_text<br>
>>>> self.execute_query(selectQuery)<br>
>>>> File<br>
>>>> "/home/noli/.qgis/python/plugins/customdbquery/CustomDBQueryDialog.py",<br>
>>>> line 187, in execute_query<br>
>>>> self.run_normal_query(createTableQuery, connection)<br>
>>>> File<br>
>>>> "/home/noli/.qgis/python/plugins/customdbquery/CustomDBQueryDialog.py",<br>
>>>> line 238, in run_normal_query<br>
>>>> cursor.execute(query)<br>
>>>> ProgrammingError: column "A" does not exist<br>
>>>> LINE 1: ...ne.Veg_TYPE_A AS (Select * from stands where veg_type = "A")<br>
>>>> ^<br>
>>>><br>
>>>><br>
>>>> Python version:<br>
>>>> 2.6.5 (r265:79063, Apr 16 2010, 13:28:26)<br>
>>>> [GCC 4.4.3]<br>
>>>><br>
>>>><br>
>>>> QGIS version:<br>
>>>> 1.7.0-Trunk Trunk, 14914M<br>
>>>><br>
>>>><br>
>>>> The previous error was in Spatialite.<br>
>>>><br>
>>>> Thanks.<br>
>>>><br>
>>>> Noli<br>
>>>><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> ___________________________ ___ __<br>
>>> Ricardo Garcia Silva<br>
>>> _______________________________________________<br>
>>> Qgis-developer mailing list<br>
>>> <a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
>>> <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
>>><br>
>><br>
><br>
_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Giuseppe Sucameli<br><br>