<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Calibri",sans-serif;}
span.EmailStyle20
        {mso-style-type:personal-compose;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 129.75pt 72.0pt 129.7pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1626620751;
        mso-list-type:hybrid;
        mso-list-template-ids:-305219284 403243023 403243033 403243035 403243023 403243033 403243035 403243023 403243033 403243035;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-IE" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoPlainText">Hi Michael,<o:p></o:p></p>
<p class="MsoPlainText">To add to Thayer's message. <o:p></o:p></p>
<p class="MsoPlainText">There is currently no way to do exactly what you are looking for, but, I would suggest the following as an alternative, which is simple enough to follow…<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">There are three ways to load a filtered layer into QGIS <o:p>
</o:p></p>
<p class="MsoPlainText">Firstly, You can load a Layer using SQL Filter using the either the
<b>Data Source Manager</b> or <b>DB Manager</b>.<o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo2">
<![if !supportLists]><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">      
</span></span><![endif]><b>Data Source Manager</b> will allow you to use the <b>Set Filter</b> option on your selected Table
<o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo2">
<![if !supportLists]><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">      
</span></span><![endif]><b>DB Manager</b> will do the same when you highlight the Layer you want to load and click on the
<b>SQL Window</b><span style="mso-fareast-language:EN-IE"> <img width="19" height="19" style="width:.1979in;height:.1979in" id="Picture_x0020_1" src="cid:image002.png@01D740CC.14351C50"></span><o:p></o:p></p>
<p class="MsoPlainText" style="margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo2">
<![if !supportLists]><span style="mso-list:Ignore">3.<span style="font:7.0pt "Times New Roman"">      
</span></span><![endif]>Load the Layer in in its entirety, then use the <b>Filter</b> option by right clicking on the layer and selecting Filter.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Whichever of the above you use, the Filtered Layers can be temporally saved out as whatever format you would like while being worked on. This can be achieved by right clicking on the layer, selecting
<b>Export</b> => <b>Save</b> <b>Feature As</b><o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">I Hope that helps in some way.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Regards,<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Richard<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<table style="FONT-SIZE: 9pt; HEIGHT: 321px; FONT-FAMILY: Arial, sans-serif; WIDTH: 500px; LINE-HEIGHT: 15px" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="FONT-SIZE: 9pt; FONT-FAMILY: Arial,sans-serif; WIDTH: 500px; COLOR: #004d44; PADDING-BOTTOM: 6px">
<span style="FONT-FAMILY: Arial, sans-serif; FONT-WEIGHT: bold; COLOR: #004d44"><br>
——</span><br>
<span style="FONT-FAMILY: Arial, sans-serif; FONT-WEIGHT: bold; COLOR: #004d44">Richard McDonnell MSc GIS, FME Certified Professional</span><br>
<span style="FONT-FAMILY: Arial, sans-serif; COLOR: #004d44"><i>FRM Data Management</i></span><br>
<br>
<span style="FONT-FAMILY: Arial, sans-serif; COLOR: #004d44">——</span><br>
<span style="FONT-FAMILY: Arial, sans-serif; FONT-WEIGHT: bold; COLOR: #004d44">Oifig na nOibreacha Poiblí</span><br>
<span style="FONT-FAMILY: Arial, sans-serif; COLOR: #004d44">Office of Public Works</span><br>
<br>
<span style="FONT-FAMILY: Arial, sans-serif; FONT-WEIGHT: bold; COLOR: #565148">Sráid Jonathan Swift, Baile Átha Troim, Co na Mí, C15 NX36
</span><br>
<span style="FONT-FAMILY: Arial, sans-serif; COLOR: #565148">Jonathan Swift Street, Trim, Co Meath, C15 NX36</span><br>
<span style="FONT-FAMILY: Arial, sans-serif; COLOR: #565148">——</span><br>
<span style="FONT-FAMILY: Arial, sans-serif; COLOR: #565148">M +353 87 688 5964 T +353 46 942 2409</span><br>
<a href="https://gov.ie/opw">https://gov.ie/opw</a><br>
<br>
<span style="FONT-FAMILY: Arial, sans-serif; COLOR: #004d44">——<br>
To send me files larger than 30MB, please use the link below https://filetransfer.opw.ie/filedrop/richard.mcdonnell@opw.ie<br>
</span><br>
<span style="FONT-FAMILY: Arial, sans-serif; COLOR: #004d44">Email Disclaimer: https://www.gov.ie/en/organisation-information/439daf-email-disclaimer/
</span></td>
</tr>
</tbody>
</table>
<table style="FONT-SIZE: 9pt; FONT-FAMILY: Arial, sans-serif; WIDTH: 420px; LINE-HEIGHT: 15px" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="FONT-SIZE: 9pt; FONT-FAMILY: Arial,sans-serif; WIDTH: 420px; COLOR: #004d44; PADDING-BOTTOM: 6px">
<span style="FONT-FAMILY: Arial, sans-serif; FONT-WEIGHT: bold; COLOR: #004d44"><br>
——</span><br>
<span style="FONT-FAMILY: Arial, sans-serif; FONT-WEIGHT: bold; COLOR: #004d44">MSc GIS, FME Certified Professional</span><br>
<br>
<span style="FONT-FAMILY: Arial, sans-serif; COLOR: #004d44">——</span><br>
<span style="FONT-FAMILY: Arial, sans-serif; FONT-WEIGHT: bold; COLOR: #004d44">Oifig na nOibreacha Poiblí</span><br>
<span style="FONT-FAMILY: Arial, sans-serif; COLOR: #004d44">Office of Public Works</span><br>
<br>
<span style="FONT-FAMILY: Arial, sans-serif; FONT-WEIGHT: bold; COLOR: #565148">Sráid Jonathan Swift, Baile Átha Troim, Co na Mí, C15 NX36
</span><br>
<span style="FONT-FAMILY: Arial, sans-serif; COLOR: #565148">Jonathan Swift Street, Trim, Co Meath, C15 NX36</span><br>
<span style="FONT-FAMILY: Arial, sans-serif; COLOR: #565148">——</span><br>
<span style="FONT-FAMILY: Arial, sans-serif; COLOR: #565148">M +353 87 688 5964 T +353 46 942 2409</span><br>
<font color="#565148"><a href="https://www.opw.ie">https://www.opw.ie</a></font><br>
<br>
<span style="FONT-FAMILY: Arial, sans-serif; COLOR: #004d44">——<br>
</span><span style="FONT-FAMILY: Arial, sans-serif; COLOR: #004d44">Email Disclaimer:
<a href="https://www.opw.ie/en/disclaimer/">https://www.opw.ie/en/disclaimer/</a></span>
</td>
</tr>
</tbody>
</table>
<p class="MsoPlainText">> <span lang="EN-US" style="mso-fareast-language:EN-IE">-----Original Message-----</span><o:p></o:p></p>
<p class="MsoPlainText">> <span lang="EN-US" style="mso-fareast-language:EN-IE">From: Qgis-user <qgis-user-bounces@lists.osgeo.org> On Behalf Of Michael</span><o:p></o:p></p>
<p class="MsoPlainText">> <span lang="EN-US" style="mso-fareast-language:EN-IE">Gieding</span><o:p></o:p></p>
<p class="MsoPlainText">> <span lang="EN-US" style="mso-fareast-language:EN-IE">Sent: 03 May 2021 19:12</span><o:p></o:p></p>
<p class="MsoPlainText">> <span lang="EN-US" style="mso-fareast-language:EN-IE">To: QGIS-User Mailinglist <qgis-user@lists.osgeo.org></span><o:p></o:p></p>
<p class="MsoPlainText">> <span lang="EN-US" style="mso-fareast-language:EN-IE">Subject: [Qgis-user] Loading filtered database table as temp layer</span><o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> Hallo erverybody,<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> I'm looking for a solution where users can load the output of a sql statement<o:p></o:p></p>
<p class="MsoPlainText">> from PostgreSQL as temporary layer.<o:p></o:p></p>
<p class="MsoPlainText">> The tool should be as easy as possible, as the target group is not very<o:p></o:p></p>
<p class="MsoPlainText">> experienced in QGIS. Means there should be some defined fields to enter<o:p></o:p></p>
<p class="MsoPlainText">> values for filtering and an ok-button to create the desired layer.<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> One idea I tried, is to create a workflow in the graphical modelbuilder in<o:p></o:p></p>
<p class="MsoPlainText">> QGIS. In the moment it works to create a new layer with the desired SQL-<o:p></o:p></p>
<p class="MsoPlainText">> statement. I used the algorithms "PostgreSQL SQL execute and load" --><o:p></o:p></p>
<p class="MsoPlainText">> "Load Layer to project".<o:p></o:p></p>
<p class="MsoPlainText">> But I can't find an option to load the output of the statement as a temporary.<o:p></o:p></p>
<p class="MsoPlainText">> The result is like a loaded statement from the database manager. So the<o:p></o:p></p>
<p class="MsoPlainText">> users would work with the original data within the database.<o:p></o:p></p>
<p class="MsoPlainText">> Does anyone has got an idea to achieve this? Maybe I've overseen<o:p></o:p></p>
<p class="MsoPlainText">> something.<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> Of course a separate plugin would do the thing, but with my skills it's way<o:p></o:p></p>
<p class="MsoPlainText">> more difficult to achieve.<o:p></o:p></p>
<p class="MsoPlainText">> So I would be happy to solve the problem the "easy way".<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> Any (other) hint is welcome.<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> Many thanks in advance.<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> Michael Gieding<o:p></o:p></p>
<p class="MsoPlainText">> _______________________________________________<o:p></o:p></p>
<p class="MsoPlainText">> Qgis-user mailing list<o:p></o:p></p>
<p class="MsoPlainText">> <a href="mailto:Qgis-user@lists.osgeo.org"><span style="color:windowtext;text-decoration:none">Qgis-user@lists.osgeo.org</span></a><o:p></o:p></p>
<p class="MsoPlainText">> List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user">
<span style="color:windowtext;text-decoration:none">https://lists.osgeo.org/mailman/listinfo/qgis-user</span></a><o:p></o:p></p>
<p class="MsoPlainText">> Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user">
<span style="color:windowtext;text-decoration:none">https://lists.osgeo.org/mailman/listinfo/qgis-user</span></a><o:p></o:p></p>
</div>

<span style="font-family: Arial, sans-serif; font-size: 9pt; color: rgb(0, 77, 68);">Please note that the existing 01-6476XXX / 046-9426XXX numbering ranges will no longer be available after 30th April 2021.</span>

</body>
</html>