<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged sql</title>
<link>https://overflow.efficy.io/?qa=tag/sql</link>
<description>Powered by Question2Answer</description>
<item>
<title>Azure SQL Support</title>
<link>https://overflow.efficy.io/?qa=6965/azure-sql-support</link>
<description>&lt;p&gt;Dear Efficy Team,&lt;/p&gt;

&lt;p&gt;I've seen the supported DB are, according to the documentation (&lt;a rel=&quot;nofollow&quot; href=&quot;https://help.efficy.io/edn/admin/sppl_serversoftware),&quot;&gt;https://help.efficy.io/edn/admin/sppl_serversoftware),&lt;/a&gt; Microsoft SQL Server, Oracle and PostgreSQL.&lt;/p&gt;

&lt;p&gt;I have a client that would try deploying Efficy on a cloud environment using Azure SQL.&lt;/p&gt;

&lt;p&gt;Would this work ? Do we need some special work-around ?&lt;br&gt;
Or is it just not possible and we'll need a virtual SQL server ?&lt;/p&gt;

&lt;p&gt;Thanks for your help,&lt;/p&gt;

&lt;p&gt;Alexandre&lt;/p&gt;
</description>
<category>Efficy Installation/Settings</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6965/azure-sql-support</guid>
<pubDate>Fri, 08 Sep 2023 14:51:12 +0000</pubDate>
</item>
<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>how activate data-inline edit-columns for a native SQL result grid.</title>
<link>https://overflow.efficy.io/?qa=6487/how-activate-data-inline-edit-columns-for-native-result-grid</link>
<description>&lt;p&gt;&lt;strong&gt;here a classical result query result made with wizard&lt;/strong&gt; &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;table class=&quot;data-grid grid-density-0&quot; data-channel=&quot;entitylist/grid&quot; data-entity=&quot;&quot; data-recordcount=&quot;30&quot; data-columnlist=&quot;N,K_USER,D_CREATE,K_ACTION,Sujet_de_l_action,K_CASE,Nom_de_l_incident,DURATION,K_ACTION_1,K_CASE_1&quot; data-inlineedit-columns=&quot;1{NUMERIC},2{DATETIME},3{NUMERIC},4{},5{NUMERIC},6{},7{NUMERIC},8{NUMERIC},9{NUMERIC}&quot; data-inlineedit-origins=&quot;,ACTIONS,ACTIONS,ACTIONS,ACTIONS,CASES,CASES,ACTIONS,ACTIONS,CASES&quot; data-queryhandle=&quot;21&quot;&amp;gt;

&amp;lt;tr data-key=&quot;387650&quot; class=&quot;&quot; data-record-hash=&quot;77073465&quot; data-inlineedit-row-origins=&quot;ACTIONS=387650,CASES=32709&quot;&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;here the result with a native SQL&lt;/strong&gt; &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;table class=&quot;data-grid grid-density-0&quot; data-channel=&quot;entitylist/grid&quot; data-entity=&quot;&quot; data-recordcount=&quot;1&quot; data-columnlist=&quot;N,K_TIMESHEET,K_STEP,K_PROJECT,K_DOCUMENT,K_PUBLICATION,DOSSIER,PUBLICATION,BC/DEVIS,SUBJECT,WORK_ESTIMATED,WORK_UPDATED,PROGRESS,TOTALINVOICED&quot; data-inlineedit-columns=&quot;&quot; data-inlineedit-origins=&quot;&quot; data-queryhandle=&quot;23&quot;&amp;gt;

&amp;lt;tr data-key=&quot;&quot; class=&quot;&quot; data-record-hash=&quot;-272002184&quot; data-inlineedit-row-origins=&quot;&quot;&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;All the options for inline edit are gone. &lt;br&gt;
So is there any solution to have the same thing ? &lt;/p&gt;

&lt;p&gt;Thank's &lt;br&gt;
Laurent&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6487/how-activate-data-inline-edit-columns-for-native-result-grid</guid>
<pubDate>Fri, 11 Mar 2022 13:07:46 +0000</pubDate>
</item>
<item>
<title>issue in native sql request parameter in relationColumns.txt</title>
<link>https://overflow.efficy.io/?qa=6155/issue-in-native-sql-request-parameter-relationcolumns-txt</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;In detail tab of edit window, we aim to overload the display of companies, using custom field (F_ACRONYME) instead of field NAME.&lt;/p&gt;

&lt;p&gt;To do that, in relationColumns.txt i tried to construct a sql query to get F_ACRONYME in COMPANIES table :&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;td.FULLNAME.Comp      {[
  &amp;lt;%RunQuery(id=&quot;acronymeCompanie&quot;,
            sql=&quot;select F_ACRONYME from &amp;lt;#table name='COMPANIES'&amp;gt; C where C.K_COMPANY=:param1&quot;,
            param1 = &quot;$KEY$&quot; ,
       store=T)%&amp;gt;
  &amp;lt;a data-msg=&quot;view;$entity$;&amp;lt;#F=$KEY$;context=ATTR&amp;gt;&quot; href=&quot;#&quot; class=&quot;&amp;lt;#I=OPENED;0=inactive&amp;gt;&quot; title=&quot;&amp;lt;#F=NAME;nospace=T;context=ATTR&amp;gt;&quot;&amp;gt;
  &amp;lt;%GetField(&quot;F_ACRONYME&quot;,query='acronymeCompanie',context=TEXT)%&amp;gt;  &amp;lt;/a&amp;gt;
  ]} 
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;When i run this code i get this error : &quot;Incorrect number of parameters&quot;&lt;br&gt;
I tried to  change $KEY$ to {key} but it doesn't work.&lt;/p&gt;

&lt;p&gt;If i delete parameter 1 to test sql query i get this error : &quot;Duplicate Query Definition: &quot;acronymeCompanie&quot;&lt;/p&gt;

&lt;p&gt;Can you help me to understand and resolve these 2 errors ?&lt;/p&gt;

&lt;p&gt;Thanks,&lt;/p&gt;

&lt;p&gt;Best regards&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6155/issue-in-native-sql-request-parameter-relationcolumns-txt</guid>
<pubDate>Mon, 07 Jun 2021 13:16:48 +0000</pubDate>
</item>
<item>
<title>View or function 'R_CONTACTS' has more column names specified than columns defined.</title>
<link>https://overflow.efficy.io/?qa=5075/function-rcontacts-column-names-specified-columns-defined</link>
<description>&lt;p&gt;Hi everyone,&lt;/p&gt;

&lt;p&gt;I'm working on a migration from 2012 to 11.3&lt;br&gt;
Db Upgrade have run without any error, i can connect, i can .. etc.&lt;/p&gt;

&lt;p&gt;But, when trying to make a query using &lt;code&gt;R_CONTACTS&lt;/code&gt;, i get this error:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;View or function 'R_CONTACTS' has more column names specified than columns defined.
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;DB Version is &lt;code&gt;11.3.18520.0&lt;/code&gt;&lt;br&gt;
Rdgb: SQL Server&lt;/p&gt;

&lt;p&gt;I don't know if the probleme is linked to my database, or if it is a bug/missing part in the upgrade DB, but ... i found this solution to unblock me.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;EXECUTE sp_refreshview 'R_CONTACTS'
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5075/function-rcontacts-column-names-specified-columns-defined</guid>
<pubDate>Tue, 26 Nov 2019 10:50:15 +0000</pubDate>
</item>
<item>
<title>3rd party needs read-only access to efficy database</title>
<link>https://overflow.efficy.io/?qa=4165/3rd-party-needs-read-only-access-to-efficy-database</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;A client on premise works with a 3rd party company for their telephony purposes. They need to store efficy data in their database for quick interaction with and from efficy to their communications system.&lt;/p&gt;

&lt;p&gt;Not being able to use dumps (their system can't handle big files), we would like to give this client read-only access to a specific part of the database (in this case only 1 view).&lt;/p&gt;

&lt;p&gt;I would prefer to do this with queries, so it can be used for other customers. &lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4165/3rd-party-needs-read-only-access-to-efficy-database</guid>
<pubDate>Thu, 25 Apr 2019 06:30:31 +0000</pubDate>
</item>
<item>
<title>NOMAD Server needs?</title>
<link>https://overflow.efficy.io/?qa=3962/nomad-server-needs</link>
<description>&lt;p&gt;What are the current system requirements for a NOMAD DB to set up at a customer.&lt;/p&gt;

&lt;p&gt;Windows version&lt;br&gt;
SQL version&lt;br&gt;
GB disk&lt;br&gt;
GB DB&lt;br&gt;
and so on...&lt;/p&gt;

&lt;p&gt;As Efficy changes I'm looking at the latest specs.&lt;/p&gt;

&lt;p&gt;thanks in advance&lt;/p&gt;
</description>
<category>IT</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3962/nomad-server-needs</guid>
<pubDate>Mon, 18 Feb 2019 14:29:09 +0000</pubDate>
</item>
<item>
<title>Error on table view of companies</title>
<link>https://overflow.efficy.io/?qa=3409/error-on-table-view-of-companies</link>
<description>&lt;p&gt;Hello everyone,&lt;/p&gt;

&lt;p&gt;I have an error when i execute a simple query on the views like : &lt;/p&gt;

&lt;p&gt;select * from R_COMPANIES&lt;/p&gt;

&lt;p&gt;i got this msg : &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Msg 537, Level 16, State 3, Line 1&lt;br&gt;
Invalid length parameter passed to the LEFT or SUBSTRING function.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;NB: it just for the companies view &quot;R_COMPANIES&quot;&lt;/p&gt;

&lt;p&gt;Thank you&lt;/p&gt;

&lt;p&gt;Regards &lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3409/error-on-table-view-of-companies</guid>
<pubDate>Fri, 20 Jul 2018 15:13:56 +0000</pubDate>
</item>
<item>
<title>MSSQL DB: SQL-Views are deleted when adding new fields to DB and run &quot;apply structure&quot;</title>
<link>https://overflow.efficy.io/?qa=2904/mssql-sql-views-deleted-when-adding-fields-apply-structure</link>
<description>&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;I have an issue on MSSQL Server, with SQL-Views created by the customer. When adding new fields and run the &quot;apply structure&quot; to rebuild the DB, these Views were deleted.&lt;/p&gt;

&lt;p&gt;To overcome this issue, we used another SQL schema to create the views.&lt;/p&gt;

&lt;p&gt;Now my question, do we have another option (maybe a more Efficy appropriate) to avoid this deletion of Views?&lt;/p&gt;

&lt;p&gt;best regards&lt;/p&gt;

&lt;p&gt;Stephan&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2904/mssql-sql-views-deleted-when-adding-fields-apply-structure</guid>
<pubDate>Thu, 25 Jan 2018 16:17:55 +0000</pubDate>
</item>
<item>
<title>Crystal report is timing out in Efficy</title>
<link>https://overflow.efficy.io/?qa=2895/crystal-report-is-timing-out-in-efficy</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I'm trying to run a report which takes some time to e executed, some time i got the result and some times i don't (depends on some parameter specified before launching). the error i get is &quot;time out&quot;. &lt;/p&gt;

&lt;p&gt;So how can i extend the execution timeout on Efficy server please?&lt;/p&gt;

&lt;p&gt;Thank you for your help in advance.&lt;/p&gt;

&lt;p&gt;Best Regards.&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2895/crystal-report-is-timing-out-in-efficy</guid>
<pubDate>Mon, 22 Jan 2018 11:30:25 +0000</pubDate>
</item>
<item>
<title>Ancestors and descendants hierarchy in a relation table (SQL Server)</title>
<link>https://overflow.efficy.io/?qa=2889/ancestors-and-descendants-hierarchy-relation-table-server</link>
<description>&lt;pre&gt;&lt;code&gt;-- Get all descendant products given a parent product key
DECLARE @parentProductKey float = 200539; 
WITH PROD_HIERARCHY
AS
(
       SELECT DISTINCT
             PP1.K_PRODUCT K_PRODUCT_PARENT,
             PP1.K_PRODUCT2 K_PRODUCT_DESCENDANT
       FROM PROD_PROD PP1
             LEFT JOIN PROD_PROD PP2 ON PP1.K_PRODUCT2 = PP2.K_PRODUCT
       WHERE PP1.K_PRODUCT = @parentProductKey
       UNION ALL
       SELECT
             H.K_PRODUCT_PARENT,
             PP.K_PRODUCT2
       FROM PROD_HIERARCHY H
             INNER JOIN PROD_PROD PP ON H.K_PRODUCT_DESCENDANT = PP.K_PRODUCT
)
SELECT * FROM PROD_HIERARCHY

-- Get all ancestor products given a descendant product key
DECLARE @descendantProductKey float = 202099; 
WITH PROD_HIERARCHY AS
(
    SELECT  K_PRODUCT2 K_PRODUCT_DESCENDANT, 
            K_PRODUCT K_PRODUCT_PARENT 
    FROM    PROD_PROD
       WHERE K_PRODUCT2 = @descendantProductKey
    UNION ALL
    SELECT  PP.K_PRODUCT2, 
            PP.K_PRODUCT 
    FROM    PROD_PROD PP
            INNER JOIN PROD_HIERARCHY H ON H.K_PRODUCT_PARENT = PP.K_PRODUCT2
)
SELECT * FROM PROD_HIERARCHY
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2889/ancestors-and-descendants-hierarchy-relation-table-server</guid>
<pubDate>Wed, 17 Jan 2018 11:07:46 +0000</pubDate>
</item>
<item>
<title>Create a lookup table from scripts</title>
<link>https://overflow.efficy.io/?qa=2879/create-a-lookup-table-from-scripts</link>
<description>&lt;p&gt;Hi, &lt;/p&gt;

&lt;p&gt;To install a custom module to an other base I have to create lookup tables in the new base. &lt;br&gt;
Since the dbstaging doesn't work fine in this context (the iscustom field is not taken into consideration plus the keygen is not managed by this tool and since in the new base the Key of the lookup table is not the same)&lt;/p&gt;

&lt;p&gt;I had to make it work so this is the script I finally used. Please note that The keygen will works now, plus the ISCUSTOM field issue has been fixed as well.&lt;/p&gt;

&lt;p&gt;I would recommand to perticulary look after the use of ADMIN user and schema in my code because this part is not dynamic.&lt;/p&gt;

&lt;p&gt;NB: I chose to ignore the sys label of my table since it's a configuration table&lt;/p&gt;

&lt;p&gt;So far it works fine (on MSSQL) cheers,&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;EXECUTE AS USER = 'ADMIN'

create table LK_DP_HYPERLINKS (
    K_DP_HYPERLINKS INTEGER NOT NULL,
    K_SORT INTEGER NULL,
    K_LABEL INTEGER NULL,
    DISABLED VARCHAR(1) NOT NULL DEFAULT '0',
    F_VALUE NVARCHAR(128) NULL,
    F_URL NVARCHAR(255) NULL,
    F_SECURITY NVARCHAR(32) NULL, constraint PKLK_DP_HYPERLINKS Primary Key (K_DP_HYPERLINKS)
)

declare @K1 float
exec admin.GETNEWKEY @FIELDNAME = 'K_TABLE', @NEWIDVAL = @K1 OUTPUT

Insert into ADMIN.SYS_TABLES (K_TABLE, NAME, D_CREATE, D_CHANGE, KIND, K_LABEL, RANKING, D_REPLIC, K_REPLICUSER, ISCUSTOM) values (@K1, 'LK_DP_HYPERLINKS', GETDATE(), GETDATE(), 'L', NULL, '0', GETDATE(), 0, '1')

   Insert into ADMIN.SYS_FIELDS (K_TABLE, K_FIELD, NAME, D_CREATE, D_CHANGE, DATATYPE, DBALLOWNULL, USAGE, ALLOWNULL, LABELPOS, SEARCH, QUERY, PUBLISH, D_REPLIC, K_REPLICUSER, ISCUSTOM) values (@K1, 1, 'K_DP_HYPERLINKS', getdate(), getdate(), 'I', '0', 'K', '0', 0, '0', '1', '0', getdate(), 0, '1')
Insert into ADMIN.SYS_FIELDS (K_TABLE, K_FIELD, NAME, D_CREATE, D_CHANGE, DATATYPE, DBALLOWNULL, ALLOWNULL, LABELPOS, SEARCH, QUERY, PUBLISH, D_REPLIC, K_REPLICUSER, ISCUSTOM) values (@K1, 2, 'K_SORT', getdate(), getdate(), 'I', '1', '1', 0, '0', '1', '0', getdate(), 0, '1')
Insert into ADMIN.SYS_FIELDS (K_TABLE, K_FIELD, NAME, D_CREATE, D_CHANGE, DATATYPE, DBALLOWNULL, ALLOWNULL, LABELPOS, SEARCH, QUERY, PUBLISH, D_REPLIC, K_REPLICUSER, ISCUSTOM) values (@K1, 3, 'K_LABEL', getdate(), getdate(), 'I', '1', '1', 0, '0', '1', '0', getdate(), 0, '1')
Insert into ADMIN.SYS_FIELDS (K_TABLE, K_FIELD, NAME, D_CREATE, D_CHANGE, DATATYPE, DBDEFAULT, DBALLOWNULL, DEFAULTVALUE, ALLOWNULL, LABELPOS, SEARCH, QUERY, PUBLISH, D_REPLIC, K_REPLICUSER, ISCUSTOM) values (@K1, 4, 'DISABLED', getdate(), getdate(), 'L', '0', '0', '0', '0', 0, '0', '1', '0', getdate(), 0, '1')
Insert into ADMIN.SYS_FIELDS (K_TABLE, K_FIELD, NAME, D_CREATE, D_CHANGE, DATATYPE, DATALENGTH, DBALLOWNULL, ALLOWNULL, LABELPOS, SEARCH, QUERY, PUBLISH, D_REPLIC, K_REPLICUSER, ISCUSTOM) values (@K1, 1924, 'F_VALUE', getdate(), getdate(), 'A', 128, '1', '0', 0, '0', '1', '0', getdate(), 0, '1')
Insert into ADMIN.SYS_FIELDS (K_TABLE, K_FIELD, NAME, D_CREATE, D_CHANGE, DATATYPE, DATALENGTH, DBALLOWNULL, ALLOWNULL, LABELPOS, SEARCH, QUERY, PUBLISH, D_REPLIC, K_REPLICUSER, ISCUSTOM) values (@K1, 1925, 'F_URL', getdate(), getdate(), 'A', 255, '1', '0', 0, '0', '1', '0', getdate(), 0, '1')
Insert into ADMIN.SYS_FIELDS (K_TABLE, K_FIELD, NAME, D_CREATE, D_CHANGE, DATATYPE, DATALENGTH, DBALLOWNULL, ALLOWNULL, LABELPOS, SEARCH, QUERY, PUBLISH, D_REPLIC, K_REPLICUSER, ISCUSTOM) values (@K1, 1926, 'F_SECURITY', getdate(), getdate(), 'A', 32, '1', '0', 0, '0', '1', '0', getdate(), 0, '1')
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2879/create-a-lookup-table-from-scripts</guid>
<pubDate>Mon, 15 Jan 2018 12:08:16 +0000</pubDate>
</item>
<item>
<title>usinge parameter in SQL statement in queryview</title>
<link>https://overflow.efficy.io/?qa=2354/usinge-parameter-in-sql-statement-in-queryview</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I'm getting error &quot;Custom view has been disabled&quot; when i try use SQL statement in condition with passing parameter query &quot;userkey&quot;.&lt;/p&gt;

&lt;p&gt;is it possible to do that? like this:&lt;/p&gt;

&lt;p&gt;comp&lt;em&gt;user.keyOfUser in select F&lt;/em&gt;SRG from LK&lt;em&gt;SECURITY&lt;/em&gt;MATRIX where F_USER= 'userkey'&lt;/p&gt;

&lt;p&gt;Thank you in advance for your help.&lt;/p&gt;

&lt;p&gt;Best Regards.&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2354/usinge-parameter-in-sql-statement-in-queryview</guid>
<pubDate>Mon, 13 Mar 2017 13:38:21 +0000</pubDate>
</item>
<item>
<title>Missing foreign key constraint on cont_cont, comp_comp,...</title>
<link>https://overflow.efficy.io/?qa=2279/missing-foreign-key-constraint-on-contcont-compcomp</link>
<description>&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;We created an SQL script responsible for cleaning the links in cont&amp;#95;cont, comp&amp;#95;comp and cont&amp;#95;comp, updating some custom fields in the meantime.&lt;br&gt;
We also create the &quot;opposite&quot; link when missing or update it if already there.&lt;br&gt;
We however noticed that we were getting some SQL errors stating that when creating the reverse link, the foreign key constraint was violated.&lt;/p&gt;

&lt;p&gt;After some investigation, we found out that there were some records in cont&amp;#95;cont and comp&amp;#95;comp where k&amp;#95;contact2 and k&amp;#95;company2 respectively were pointing to non-existent contacts and companies (resp).&lt;br&gt;
Truth is, there are no foreign key constraints on these k&amp;#95;...2 fields and therefore when someone deletes a record, only the links where its key is in k&amp;#95;contact (or k&amp;#95;company) are deleted, but not where its key is in k&amp;#95;contact2 (or k&amp;#95;company2), since no &quot;delete cascade&quot; is associated to them.&lt;/p&gt;

&lt;p&gt;Is this the intended behaviour?&lt;br&gt;
Is there a reason why the foreign key constraints on k&amp;#95;...2 fields are missing?&lt;/p&gt;

&lt;p&gt;Thank you,&lt;br&gt;
Kind regards,&lt;/p&gt;

&lt;p&gt;Laurent&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2279/missing-foreign-key-constraint-on-contcont-compcomp</guid>
<pubDate>Fri, 10 Feb 2017 14:47:21 +0000</pubDate>
</item>
<item>
<title>how to set a Acc_account password from script or SQL</title>
<link>https://overflow.efficy.io/?qa=2125/how-to-set-a-accaccount-password-from-script-or-sql</link>
<description>&lt;p&gt;Hi I would like to set an Acc_account password from SQL or from a Serverscript.&lt;/p&gt;

&lt;p&gt;is that even possible?&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2125/how-to-set-a-accaccount-password-from-script-or-sql</guid>
<pubDate>Mon, 19 Dec 2016 16:22:24 +0000</pubDate>
</item>
<item>
<title>How to found the list of columns of a DataSet ?</title>
<link>https://overflow.efficy.io/?qa=1951/how-to-found-the-list-of-columns-of-a-dataset</link>
<description>&lt;p&gt;Hi to all,&lt;/p&gt;

&lt;p&gt;I want to write a &quot;generic&quot; function to read data via a SQL request...&lt;br&gt;
The problem is that I don't know the list of columns inside the Dataset result, while the query is build +/-  dynamically...&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; var mysql = &quot;select * from COMPANIES&quot;   // &amp;lt;- query unknow 
 var myDataSet = Database.ExecuteSystemSQLQuery(0, Database.OpenTemporaryContext, mysql, null, true, true, 36); //
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Is a way to obtain something like :&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var columns = myDataSet.Columns(); //   [ 'K_COMPANY', 'NAME',... ]
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Regards&lt;br&gt;
Didier&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=1951/how-to-found-the-list-of-columns-of-a-dataset</guid>
<pubDate>Fri, 21 Oct 2016 08:28:35 +0000</pubDate>
</item>
<item>
<title>Get DTSEARCH result from SQL</title>
<link>https://overflow.efficy.io/?qa=452/get-dtsearch-result-from-sql</link>
<description>&lt;p&gt;One of our client want to do something like that but without using the SOAP request.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;efficy:search entity=&quot;{Entity}&quot; method=&quot;DTSEARCH&quot; value=&quot;{String}&quot;&amp;gt;
 &amp;lt;datacontainer id=&quot;{Int}&quot;/&amp;gt;
&amp;lt;/efficy:search&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Do you know an other way by using native SQL search to get it or it's only generated by the DLL ?&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=452/get-dtsearch-result-from-sql</guid>
<pubDate>Fri, 12 Jun 2015 13:53:58 +0000</pubDate>
</item>
<item>
<title>ORA-01795: maximum number of expressions in a list is 1000</title>
<link>https://overflow.efficy.io/?qa=436/ora-01795-maximum-number-of-expressions-in-a-list-is-1000</link>
<description>&lt;p&gt;Dear,&lt;/p&gt;

&lt;p&gt;I have an entity with more then 1000 companies linked.&lt;br&gt;
When I want to link a contact to it in edit mode I get this error:&lt;/p&gt;

&lt;p&gt;ORA-01795: maximum number of expressions in a list is 1000&lt;/p&gt;

&lt;p&gt;You get this error because Efficy is generating a query where it joins all companies by using an 'IN' statement: where k_company in ().&lt;/p&gt;

&lt;p&gt;Because I have more then 1000 companies (1814) and Oracle has the limitation of 1000 elements in an IN statement, I can not link a contact in Edit mode.&lt;/p&gt;

&lt;p&gt;Can I overwrite this standard generated query and if yes how?&lt;/p&gt;

&lt;p&gt;gr&lt;br&gt;
Erwin&lt;/p&gt;
</description>
<category>Efficy Developers</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=436/ora-01795-maximum-number-of-expressions-in-a-list-is-1000</guid>
<pubDate>Fri, 05 Jun 2015 07:23:04 +0000</pubDate>
</item>
<item>
<title>Create Acti_Acti relation into SYS_ENTITYVIEWS without EntityView error</title>
<link>https://overflow.efficy.io/?qa=432/create-actiacti-relation-sysentityviews-without-entityview</link>
<description>&lt;p&gt;Hello &lt;br&gt;
I created a new relation Acti_Acti.&lt;br&gt;
Following the SQL Code to create my new relation&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;insert into SYS_ENTITYVIEWS (NAME, ISCUSTOM, TABLEVIEWS) values ('Acti_Acti', 1, 'Acti_Acti')

Update SYS_ENTITYVIEWS set 
    ISCUSTOM=1, 
    TABLEVIEWS=(SELECT TABLEVIEWS FROM SYS_ENTITYVIEWS WHERE NAME = 'ActiEdit') + ';Acti_Acti=Acti'
where NAME='ActiEdit' 

Update SYS_ENTITYVIEWS set 
    ISCUSTOM=1, 
    TABLEVIEWS=(SELECT TABLEVIEWS FROM SYS_ENTITYVIEWS WHERE NAME = 'ActiDelete') + ';Acti_Acti=Acti'
where NAME='ActiDelete' 
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;When I try create a relation from ServerScript in an Edit context the server bring me back this  error &lt;br&gt;
unknown EntityView.&lt;br&gt;
Error context.&lt;/p&gt;

&lt;p&gt;But When I create a link though the Edit screen (Standard method) it's working. &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;onclick=&quot;RelationButtonClick(this, 'Acti', '60', '1028', false)&quot; 
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Delete a relation To.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;javascript:CebPerform('CEB_DEL_REL_', 'Acti35219')
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;But I can't do the same thing from a serverscript.&lt;br&gt;
So any idea why ?&lt;/p&gt;
</description>
<category>Efficy Developers</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=432/create-actiacti-relation-sysentityviews-without-entityview</guid>
<pubDate>Wed, 03 Jun 2015 15:35:23 +0000</pubDate>
</item>
</channel>
</rss>