<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged postcode</title>
<link>https://overflow.efficy.io/?qa=tag/postcode</link>
<description>Powered by Question2Answer</description>
<item>
<title>SOAP Connection with executesqlquery including sum and having statement does not work</title>
<link>https://overflow.efficy.io/?qa=6864/soap-connection-executesqlquery-including-having-statement</link>
<description>&lt;p&gt;Hello&lt;/p&gt;

&lt;p&gt;We've been working successfully for a few years now wtih SOAP connections and SQL execution&lt;br&gt;
We're now facing an issue with a SQL clause containing a having and sum statement.&lt;br&gt;
Here is the body of the soap envelop :&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;SOAP-ENV:Envelope xmlns:efficy=&quot;http://XXXXX.efficy.cloud&quot; xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope&quot;&amp;gt;
&amp;lt;SOAP-ENV:Body&amp;gt;
&amp;lt;efficy:api&amp;gt; 
&amp;lt;currentuserfullname/&amp;gt;
&amp;lt;datacontainer id=&quot;1&quot; operation=&quot;executesqlquery&quot; recordcount=&quot;&quot;&amp;gt;                    

&amp;lt;sql&amp;gt;
SELECT 
C.F_SAP,
   COALESCE(SUM(F_CA_CUMULE_N), 0) as CA_N,
    COALESCE(SUM(F_CA_TOTAL_N_1), 0) as 'CA_N - 1',
    COALESCE(SUM(F_CA_TOTAL_N_2), 0) as 'CA_N - 2',
    COALESCE(SUM(F_CA_CUMULE_N), 0)  +  COALESCE(SUM(F_CA_TOTAL_N_1), 0) +  COALESCE(SUM(F_CA_TOTAL_N_2), 0) as TOTAL_CA


    FROM 
    (
    SALE_COMP SC
    INNER JOIN
        SALES S
    ON
        S.K_SALE = SC.K_SALE
     )
inner join r_companies C
on 
(C.K_COMPANY= SC.K_COMPANY)

Where
len(C.F_SAP)&amp;gt;0 

GROUP BY
C.F_SAP
having COALESCE(SUM(F_CA_CUMULE_N), 0)  +  COALESCE(SUM(F_CA_TOTAL_N_1), 0) +  COALESCE(SUM(F_CA_TOTAL_N_2), 0) &amp;gt;3000
&amp;lt;/sql&amp;gt;
&amp;lt;queryparams&amp;gt;&amp;lt;/queryparams&amp;gt;
&amp;lt;/datacontainer&amp;gt;
&amp;lt;/efficy:api&amp;gt;
&amp;lt;efficy:logoff/&amp;gt;
&amp;lt;/SOAP-ENV:Body&amp;gt;
&amp;lt;/SOAP-ENV:Envelope&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The post method returns the following error message :&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;EEfficyExceptionCannot find Child Node &quot;document&quot;LIBS-1822
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If I use a more simple SQL pointing to the exact same tables, I have no problem :&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;   &amp;lt;SOAP-ENV:Envelope xmlns:efficy=&quot;http://XXXX.efficy.cloud&quot; xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope&quot;&amp;gt;
&amp;lt;SOAP-ENV:Body&amp;gt;
&amp;lt;efficy:api&amp;gt; 
&amp;lt;currentuserfullname/&amp;gt;
&amp;lt;datacontainer id=&quot;1&quot; operation=&quot;executesqlquery&quot; recordcount=&quot;&quot;&amp;gt;                    

&amp;lt;sql&amp;gt;
SELECT 
C.F_SAP


    FROM 
    (
    SALE_COMP SC
    INNER JOIN
        SALES S
    ON
        S.K_SALE = SC.K_SALE
     )
inner join r_companies C
on 
(C.K_COMPANY= SC.K_COMPANY)

Where
len(C.F_SAP)&amp;gt;0 

GROUP BY
C.F_SAP


&amp;lt;/sql&amp;gt;
&amp;lt;queryparams&amp;gt;&amp;lt;/queryparams&amp;gt;
&amp;lt;/datacontainer&amp;gt;
&amp;lt;/efficy:api&amp;gt;
&amp;lt;efficy:logoff/&amp;gt;
&amp;lt;/SOAP-ENV:Body&amp;gt;
&amp;lt;/SOAP-ENV:Envelope&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I have opened a ticket (CFT-2023-261853) but somebody mastering well SOAP connections  could help @Laurent Truffaut...&lt;/p&gt;

&lt;p&gt;thanks&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6864/soap-connection-executesqlquery-including-having-statement</guid>
<pubDate>Sat, 08 Apr 2023 08:37:35 +0000</pubDate>
</item>
<item>
<title>Would anyone have the postcode file for UK?</title>
<link>https://overflow.efficy.io/?qa=2662/would-anyone-have-the-postcode-file-for-uk</link>
<description>&lt;p&gt;Hello,&lt;br&gt;
Would anyone have the postcode/zipcode file for UK? (ready to import in DB even better)&lt;br&gt;
Many tkx&lt;br&gt;
Kind regards&lt;br&gt;
Frédéric&lt;/p&gt;
</description>
<category>Efficy Designer (Conficy)</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2662/would-anyone-have-the-postcode-file-for-uk</guid>
<pubDate>Fri, 25 Aug 2017 09:05:07 +0000</pubDate>
</item>
<item>
<title>Automatically fill in the province by postcode</title>
<link>https://overflow.efficy.io/?qa=2567/automatically-fill-in-the-province-by-postcode</link>
<description>&lt;p&gt;Hi Team,&lt;/p&gt;

&lt;p&gt;Has anybody ever done this? Simply fill in a custom &quot;province&quot; field depending on the postcode.&lt;br&gt;
Is there a database with provinces easy to match with our current postcode lookup?&lt;/p&gt;

&lt;p&gt;Thanks in advance.&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2567/automatically-fill-in-the-province-by-postcode</guid>
<pubDate>Fri, 16 Jun 2017 11:27:17 +0000</pubDate>
</item>
</channel>
</rss>