<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family:Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Hello,</div>
<div style="font-family:Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
unfortunately, the same error hapens in 3.4.1</div>
<div style="font-family:Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
for now, I´m not looking for this SQL issue to be solved,</div>
<div style="font-family:Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
but for another solution to "Group by" the elements in a shape file.</div>
<div style="font-family:Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
any ideas?</div>
<div style="font-family:Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div id="signature">
<div id="divtagdefaultwrapper" dir="ltr">
<div style="color:rgb(0,0,0); font-family:Arial,Helvetica,sans-serif; font-size:12pt">
<font face="Arial">______________________________________________</font></div>
<div><font face="Arial"><font style="background-color:rgb(255,255,255)"><span style="line-height:20px"><font face="Arial, Helvetica, sans-serif"><span style="font-size:12pt"><b></b></span></font>
<div style="color:rgb(0,0,0); font-family:Arial,Helvetica,sans-serif,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:16px; font-weight:bold">
<font face="Arial"><font color="#0c0c0c" size="4"><b style="line-height:20px">Herbert Lincon R. A. dos Santos</b></font></font></div>
<div style="color:rgb(0,0,0); font-family:Arial,Helvetica,sans-serif,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:16px; font-weight:bold">
<br>
</div>
</span></font></font></div>
<div style="color:rgb(0,0,0); font-family:Arial,Helvetica,sans-serif; font-size:12pt">
<font face="Arial"><font size="3"><font style="color:rgb(42,42,42); background-color:rgb(255,255,255)"></font><br>
</font></font></div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>De:</b> Luigi Pirelli <luipir@gmail.com><br>
<b>Enviado:</b> quinta-feira, 8 de novembro de 2018 12:56<br>
<b>Para:</b> herbert_lincon_jau@hotmail.com<br>
<b>Cc:</b> qgis-developer<br>
<b>Assunto:</b> Re: [QGIS-Developer] Execute SQL</font>
<div> </div>
</div>
<div>
<div dir="ltr">may you check on latest 3.4 and master version please?<br clear="all">
<div>
<div dir="ltr" class="x_gmail_signature">Luigi Pirelli<br>
<br>
**************************************************************************************************<br>
* LinkedIn: <a href="https://www.linkedin.com/in/luigipirelli" target="_blank">https://www.linkedin.com/in/luigipirelli</a><br>
* Stackexchange: <a href="http://gis.stackexchange.com/users/19667/luigi-pirelli" target="_blank">
http://gis.stackexchange.com/users/19667/luigi-pirelli</a><br>
* GitHub: <a href="https://github.com/luipir" target="_blank">https://github.com/luipir</a><br>
* Mastering QGIS 2nd Edition:<br>
* <a href="https://www.packtpub.com/big-data-and-business-intelligence/mastering-qgis-second-edition" target="_blank">
https://www.packtpub.com/big-data-and-business-intelligence/mastering-qgis-second-edition</a><br>
* Hire me: <a href="http://goo.gl/BYRQKg" target="_blank">http://goo.gl/BYRQKg</a><br>
**************************************************************************************************</div>
</div>
<br>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr">On Thu, 8 Nov 2018 at 14:26, Herbert Lincon <<a href="mailto:herbert_lincon_jau@hotmail.com">herbert_lincon_jau@hotmail.com</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div dir="ltr">
<div style="font-family:Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="color:black; font-family:Tahoma,sans-serif">Hello,</span><br>
</div>
<div style="font-family:Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
</div>
<div style="font-family:Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="color:black; font-family:Tahoma,sans-serif">in the user list, no-one could help me, can you?</span></div>
<div style="font-family:Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
sorry if I'm badly using this developer list</div>
<div style="font-family:Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div>
<div>
<div style="font-family:Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin:0cm 0cm 0.0001pt; font-family:"Times New Roman",serif">
<span style="font-family:"Tahoma","sans-serif"; color:black"> </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin:0cm 0cm 0.0001pt; font-family:"Times New Roman",serif">
<span style="font-family:"Tahoma","sans-serif"; color:black">In QGIS 2.18.23, I´m using the model "Execute SQL" from the Tollbox to run the statment:</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin:0cm 0cm 0.0001pt; font-family:"Times New Roman",serif">
<span style="font-family:"Tahoma","sans-serif"; color:black">"SELECT * FROM input1 ORDER BY TALHAO ASC;"</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin:0cm 0cm 0.0001pt; font-family:"Times New Roman",serif">
<span style="font-family:"Tahoma","sans-serif"; color:black">​where "TALHAO" is the name of a colum with integer values.</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin:0cm 0cm 0.0001pt; font-family:"Times New Roman",serif">
<span style="font-family:"Tahoma","sans-serif"; color:black"> </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin:0cm 0cm 0.0001pt; font-family:"Times New Roman",serif">
<span style="font-family:"Tahoma","sans-serif"; color:black">My issue is:</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin:0cm 0cm 0.0001pt; font-family:"Times New Roman",serif">
<span style="font-family:"Tahoma","sans-serif"; color:black">I made a Model with several steps, and I need to put this SQL statment in the middle of it,</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin:0cm 0cm 0.0001pt; font-family:"Times New Roman",serif">
<span style="font-family:"Tahoma","sans-serif"; color:black">but this process never accept a output as input.</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin:0cm 0cm 0.0001pt; font-family:"Times New Roman",serif">
<span style="font-family:"Tahoma","sans-serif"; color:black">For example: if the "Execute SQL" is the first step, it will execute normally,</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin:0cm 0cm 0.0001pt; font-family:"Times New Roman",serif">
<span style="font-family:"Tahoma","sans-serif"; color:black">but if it is not the first one, I got this error:</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin:0cm 0cm 0.0001pt; font-family:"Times New Roman",serif">
<span style="font-family:"Tahoma","sans-serif"; color:black"> </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin:0cm 0cm 0.0001pt; font-family:"Times New Roman",serif">
<span style="font-family:"Tahoma","sans-serif"; color:red">Error executing algorithm Execute SQL
</span><span style="font-family:"Tahoma","sans-serif"; color:black"></span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin:0cm 0cm 0.0001pt; font-family:"Times New Roman",serif; margin-top:9.0pt; margin-right:0cm; margin-bottom:9.0pt; margin-left:0cm">
<b><span style="font-family:"Tahoma","sans-serif"; color:red">virtual:</span></b><span style="font-family:"Tahoma","sans-serif"; color:red"> Cannot find layer OUTPUTALGQGISDISSOLVE1_shp20181015165259558</span><span style="font-family:"Tahoma","sans-serif"; color:black"></span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin:0cm 0cm 0.0001pt; font-family:"Times New Roman",serif">
<span style="font-family:"Tahoma","sans-serif"; color:black">Searching in the %temp% folder, this output file do exist!</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin:0cm 0cm 0.0001pt; font-family:"Times New Roman",serif">
<span style="font-family:"Tahoma","sans-serif"; color:black"> </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin:0cm 0cm 0.0001pt; font-family:"Times New Roman",serif">
<span style="font-family:"Tahoma","sans-serif"; color:black">I made another attempt,</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin:0cm 0cm 0.0001pt; font-family:"Times New Roman",serif">
<span style="font-family:"Tahoma","sans-serif"; color:black">with the SQL as first step,</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin:0cm 0cm 0.0001pt; font-family:"Times New Roman",serif">
<span style="font-family:"Tahoma","sans-serif"; color:black">if the input shape is named starting with letter, it will run</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin:0cm 0cm 0.0001pt; font-family:"Times New Roman",serif">
<span style="font-family:"Tahoma","sans-serif"; color:black">if the input name´s starts with number, a got this error:</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin:0cm 0cm 0.0001pt; font-family:"Times New Roman",serif">
<span style="font-family:"Tahoma","sans-serif"; color:black"> </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin:0cm 0cm 0.0001pt; font-family:"Times New Roman",serif">
<span style="font-family:"Tahoma","sans-serif"; color:red">Error executing algorithm Execute SQL
</span><span style="font-family:"Tahoma","sans-serif"; color:black"></span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin:0cm 0cm 0.0001pt; font-family:"Times New Roman",serif; margin-top:9.0pt; margin-right:0cm; margin-bottom:9.0pt; margin-left:0cm">
<b><span style="font-family:"Tahoma","sans-serif"; color:red">virtual:</span></b><span style="font-family:"Tahoma","sans-serif"; color:red"> Query execution error on DROP TABLE IF EXISTS "input1"; CREATE VIRTUAL TABLE "input1" USING QgsVLayer(81121_463_DE20181015165152041);:
 1 - unrecognized token: "81121_463_DE20181015165152041"</span><span style="font-family:"Tahoma","sans-serif"; color:black"></span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin:0cm 0cm 0.0001pt; font-family:"Times New Roman",serif">
<span style="font-family:"Tahoma","sans-serif"; color:black"> </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin:0cm 0cm 0.0001pt; font-family:"Times New Roman",serif">
<span style="font-family:"Tahoma","sans-serif"; color:black"> </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin:0cm 0cm 0.0001pt; font-family:"Times New Roman",serif">
<span style="font-family:"Tahoma","sans-serif"; color:black">I can´t understand why sometimes this algoritm run, and sometimes not</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin:0cm 0cm 0.0001pt; font-family:"Times New Roman",serif">
<span style="font-family:"Tahoma","sans-serif"; color:black">I would appreciate some help</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin:0cm 0cm 0.0001pt; font-family:"Times New Roman",serif">
<span style="font-family:"Tahoma","sans-serif"; color:black"> </span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin-top:0px; margin-bottom:0px; margin:0cm 0cm 0.0001pt; font-family:"Times New Roman",serif">
<span style="font-family:"Tahoma","sans-serif"; color:black">Thanks for the Attention</span></p>
<br>
</div>
<div style="font-family:Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-family:Arial; color:rgb(0,0,0); font-size:12pt">______________________________________________</span><br>
</div>
<div id="x_m_2060764957840500038signature">
<div id="x_m_2060764957840500038divtagdefaultwrapper" dir="ltr">
<div><font face="Arial"><font style="background-color:rgb(255,255,255)"><span style="line-height:20px"><font face="Arial, Helvetica, sans-serif"><span style="font-size:12pt"><b></b></span></font>
<div style="color:rgb(0,0,0); font-family:Arial,Helvetica,sans-serif,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:16px; font-weight:bold">
<font face="Arial"><font color="#0c0c0c" size="4"><b style="line-height:20px">Herbert Lincon R. A. dos Santos</b></font></font></div>
<div style="color:rgb(0,0,0); font-family:Arial,Helvetica,sans-serif,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:16px; font-weight:bold">
<br>
</div>
</span></font></font></div>
<div style="color:rgb(0,0,0); font-family:Arial,Helvetica,sans-serif; font-size:12pt">
<font face="Arial"><font size="3"><font style="color:rgb(42,42,42); background-color:rgb(255,255,255)"></font><br>
</font></font></div>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">
https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">
https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></blockquote>
</div>
</div>
</body>
</html>