<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions and answers in Database</title>
<link>https://overflow.efficy.io/?qa=qa/developers/database</link>
<description>Powered by Question2Answer</description>
<item>
<title>Answered: Delete a custom entity</title>
<link>https://overflow.efficy.io/?qa=4326/delete-a-custom-entity&amp;show=7219#a7219</link>
<description>&lt;p&gt;For Whom it may concern, The Oracle version of What Kristof presented:&lt;br&gt;
First, drop the views and tables related to the entity. With the SQL below, you can generate the drop statements&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;DECLARE
    v_K_ENTITY   NUMBER;
    v_NAME       NVARCHAR2(32);
    v_TABLENAME  NVARCHAR2(24);
BEGIN
    v_K_ENTITY := 51;

    SELECT NAME
    INTO v_NAME
    FROM SYS_ENTITIES
    WHERE K_ENTITY = v_K_ENTITY;

    -- Drop view statements
   FOR r IN (
       SELECT 'drop view R_' || NAME AS stmt
       FROM SYS_TABLES
       WHERE ROUND(K_TABLE, -3)/1000 = v_K_ENTITY
           OR SUBSTR(TO_CHAR(K_TABLE), -3) = '0' || v_K_ENTITY
    ) LOOP
        DBMS_OUTPUT.PUT_LINE(r.stmt);
    END LOOP;

    -- Drop table statements
    FOR r IN (
        SELECT 'drop table ' || NAME AS stmt
        FROM SYS_TABLES
        WHERE ROUND(K_TABLE, -3)/1000 = v_K_ENTITY
           OR SUBSTR(TO_CHAR(K_TABLE), -3) = '0' || v_K_ENTITY
    ) LOOP
         DBMS_OUTPUT.PUT_LINE(r.stmt);
    END LOOP;
END;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now proceed with the system tables cleanup. Note that the order of execution is important.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;DECLARE
     v_K_ENTITY   NUMBER := 50;
     v_NAME       NVARCHAR2(32);
BEGIN

    -- Get entity name
    SELECT NAME
    INTO v_NAME
    FROM SYS_ENTITIES
    WHERE K_ENTITY = v_K_ENTITY;

    ---------------------------------------------------
    -- Ordered deletes (DO NOT REORDER)
    ---------------------------------------------------

    DELETE FROM SYS_REFERENCES
    WHERE K_TABLE = v_K_ENTITY * 1000;

    DELETE FROM SYS_QUERIES
    WHERE K_MASTER = v_K_ENTITY
       OR K_DETAIL = v_K_ENTITY;

    DELETE FROM SYS_RELATIONS
    WHERE K_TABLE1 = v_K_ENTITY * 1000
       OR K_TABLE2 = v_K_ENTITY * 1000;

    DELETE FROM SYS_RELENTITIES
    WHERE ROUND(K_TABLE, -3)/1000 = v_K_ENTITY
       OR SUBSTR(TO_CHAR(K_TABLE), -3) = '0' || v_K_ENTITY;

    DELETE FROM SYS_FIELDS
    WHERE K_TABLE IN (
        SELECT K_TABLE
            FROM SYS_TABLES
            WHERE ROUND(K_TABLE, -3)/1000 = v_K_ENTITY
    );

    DELETE FROM SYS_TABLES
    WHERE ROUND(K_TABLE, -3)/1000 = v_K_ENTITY
       OR SUBSTR(TO_CHAR(K_TABLE), -3) = '0' || v_K_ENTITY;

    DELETE FROM SYS_SECTFIELDS
    WHERE K_SECTION IN (
        SELECT K_SECTION
        FROM SYS_SECTIONS
        WHERE K_FORM IN (
            SELECT K_FORM
            FROM SYS_FORMS
            WHERE K_TABLE = v_K_ENTITY * 1000
        )
    );

    DELETE FROM SYS_SECTIONS
    WHERE K_FORM IN (
        SELECT K_FORM
        FROM SYS_FORMS
        WHERE K_TABLE = v_K_ENTITY * 1000
    );

    DELETE FROM SYS_FORMS
    WHERE K_TABLE = v_K_ENTITY * 1000;

    DELETE FROM SYS_ENTITIES
    WHERE K_ENTITY = v_K_ENTITY;

    DELETE FROM SYS_TABLEVIEWS
    WHERE ROUND(K_TABLE, -3)/1000 = v_K_ENTITY
       OR SUBSTR(TO_CHAR(K_TABLE), -3) = '0' || v_K_ENTITY;

    DELETE FROM SYS_ENTITYVIEWS
    WHERE NAME LIKE '%' || v_NAME || '%';

    ---------------------------------------------------
    -- Update with nested REPLACE
    ---------------------------------------------------

    UPDATE SYS_ENTITYVIEWS
    SET TABLEVIEWS =
        REPLACE(
            REPLACE(
                TABLEVIEWS,
                ';' || SUBSTR(NAME,1,4) || '_' || v_NAME || '=' || v_NAME,
                ''
            ),
            ';' || v_NAME || '_' || SUBSTR(NAME,1,4) || '=' || v_NAME,
            ''
        )
    WHERE TABLEVIEWS LIKE '%;' || SUBSTR(NAME,1,4) || '_' || v_NAME || '=' ||     v_NAME || '%'
   OR TABLEVIEWS LIKE '%;' || v_NAME || '_' || SUBSTR(NAME,1,4) || '=' || v_NAME || '%';

COMMIT;

END;
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4326/delete-a-custom-entity&amp;show=7219#a7219</guid>
<pubDate>Thu, 12 Feb 2026 14:41:50 +0000</pubDate>
</item>
<item>
<title>Answered: Where are the &quot;Follow&quot; notification details stored?</title>
<link>https://overflow.efficy.io/?qa=7075/where-are-the-follow-notification-details-stored&amp;show=7076#a7076</link>
<description>&lt;p&gt;Hi Hamid&lt;/p&gt;

&lt;p&gt;They are stored in the &lt;code&gt;Xxxx_User&lt;/code&gt; table, e.g. &lt;code&gt;COMP_USER&lt;/code&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;select NOTIFY from COMP_USER where K_COMPANY=:p1
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The value is a power of 2 sum. So, when all 4 are checked, notify will be 15.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Modified (1)&lt;/li&gt;
&lt;li&gt;Deleted (2)&lt;/li&gt;
&lt;li&gt;Link Added (4)&lt;/li&gt;
&lt;li&gt;Link modified (8)&lt;/li&gt;
&lt;/ul&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=7075/where-are-the-follow-notification-details-stored&amp;show=7076#a7076</guid>
<pubDate>Mon, 22 Jul 2024 14:52:37 +0000</pubDate>
</item>
<item>
<title>Answered: ORA-01653: unable to extend table ADMINOLVEA.ACTIONS by 1024 in tablespace EFFOLVEA</title>
<link>https://overflow.efficy.io/?qa=7012/01653-unable-extend-adminolvea-actions-tablespace-effolvea&amp;show=7013#a7013</link>
<description>&lt;p&gt;Please contact Cloud for this Oracle table space error.&lt;br&gt;
I removed the customer name from the post.&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=7012/01653-unable-extend-adminolvea-actions-tablespace-effolvea&amp;show=7013#a7013</guid>
<pubDate>Wed, 20 Dec 2023 15:52:04 +0000</pubDate>
</item>
<item>
<title>Can anyone explain the SYS_TABLES table the possible values of columns kind - rgroup - ranking – code?</title>
<link>https://overflow.efficy.io/?qa=6915/anyone-explain-systables-possible-values-columns-ranking</link>
<description>&lt;p&gt;I would like to know for the &lt;code&gt;SYS_TABLES&lt;/code&gt; table the possible values of columns &lt;code&gt;kind&lt;/code&gt; - &lt;code&gt;rgroup&lt;/code&gt; - &lt;code&gt;ranking&lt;/code&gt; – &lt;code&gt;code&lt;/code&gt; and what are they used for. &lt;/p&gt;

&lt;p&gt;For some of them I know or at least I can guest but for other I don’t (the ??? and empty remarks in the following tables).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://overflow.efficy.io/?qa=blob&amp;amp;qa_blobid=17631009886513748729&quot; alt=&quot;columns kind-rgroup-ranking&quot;&gt;&lt;/p&gt;

&lt;p&gt;for the column &lt;strong&gt;code&lt;/strong&gt; : I don’t know why this code option has been added, it seems it is taking the SYS_ENTITYIES.NAME field in lowercase. Does any one could explain why we need this?&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6915/anyone-explain-systables-possible-values-columns-ranking</guid>
<pubDate>Thu, 01 Jun 2023 14:20:49 +0000</pubDate>
</item>
<item>
<title>Can anyone explain the SYS_ENTITIES columns secured - notify - favorite - sharingcontext - drive – dashboard?</title>
<link>https://overflow.efficy.io/?qa=6914/explain-sysentities-favorite-sharingcontext-dashboard</link>
<description>&lt;p&gt;I need to create an entity manually in order to avoid the creation of relation tables and default configuration of Efficy Designer. In order to do that I need to understand some system table configuration.&lt;/p&gt;

&lt;p&gt;So, I would like to know for the SYS_ENTITIES table, the possible values for the columns secured - notify - favorite - sharingcontext - drive – dashboard and what are they used for. &lt;/p&gt;

&lt;p&gt;For some of them I know or at least I can guest but for other I don’t.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://overflow.efficy.io/?qa=blob&amp;amp;qa_blobid=7330103018480461348&quot; alt=&quot;Secured column&quot;&gt;&lt;br&gt;
&lt;img src=&quot;https://overflow.efficy.io/?qa=blob&amp;amp;qa_blobid=12978463065808805627&quot; alt=&quot;Notify column&quot;&gt;&lt;br&gt;
&lt;img src=&quot;https://overflow.efficy.io/?qa=blob&amp;amp;qa_blobid=13964495123688871559&quot; alt=&quot;Favorite column&quot;&gt;&lt;/p&gt;

&lt;p&gt;For the SharingContext, I supposed it is used to make the entity available in the Group tab “Sharing List” in order to know which binary value is for which entity to Share, am I correct? &lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://overflow.efficy.io/?qa=blob&amp;amp;qa_blobid=7267659443188312456&quot; alt=&quot;SharingContext column&quot;&gt;&lt;br&gt;
&lt;img src=&quot;https://overflow.efficy.io/?qa=blob&amp;amp;qa_blobid=494318966664571118&quot; alt=&quot;Drive column&quot;&gt;&lt;br&gt;
&lt;img src=&quot;https://overflow.efficy.io/?qa=blob&amp;amp;qa_blobid=3288678647642069295&quot; alt=&quot;Dashboard columneff&quot;&gt;&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6914/explain-sysentities-favorite-sharingcontext-dashboard</guid>
<pubDate>Thu, 01 Jun 2023 10:41:14 +0000</pubDate>
</item>
<item>
<title>Answered: Upgrade from Oracle to SQL Server</title>
<link>https://overflow.efficy.io/?qa=6754/upgrade-from-oracle-to-sql-server&amp;show=6757#a6757</link>
<description>&lt;p&gt;See internal SBM document &lt;a rel=&quot;nofollow&quot; href=&quot;https://submariners.efficy.com/crm/view/Docu/472895&quot;&gt;How to migrate from Oracle to SQL Server&lt;/a&gt;&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6754/upgrade-from-oracle-to-sql-server&amp;show=6757#a6757</guid>
<pubDate>Thu, 10 Nov 2022 11:14:19 +0000</pubDate>
</item>
<item>
<title>Answered: LOGCHANGES selected fields for logging</title>
<link>https://overflow.efficy.io/?qa=6724/logchanges-selected-fields-for-logging&amp;show=6726#a6726</link>
<description>&lt;p&gt;Hi Stijn&lt;/p&gt;

&lt;p&gt;Checked with latest Efficy 2022 (but it should work for prior version as well) and I correctly see log changes for modifications of &lt;code&gt;TIMESHEET.K_PROJECT&lt;/code&gt;. Did you filter on &lt;code&gt;K_3=9&lt;/code&gt;?&lt;/p&gt;

&lt;p&gt;The key of the project is logged, not the name of the project.&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6724/logchanges-selected-fields-for-logging&amp;show=6726#a6726</guid>
<pubDate>Tue, 18 Oct 2022 07:11:26 +0000</pubDate>
</item>
<item>
<title>Answered: Read JSON column in Oracle</title>
<link>https://overflow.efficy.io/?qa=6649/read-json-column-in-oracle&amp;show=6650#a6650</link>
<description>&lt;p&gt;The &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.oracle.com/database/121/SQLRF/functions093.htm#SQLRF56668&quot;&gt;JSON_VALUE&lt;/a&gt; function is available starting with Oracle Database 12c Release 1 (12.1.0.2).&lt;/p&gt;

&lt;p&gt;The Oracle we have at Efficy is 12.1.0.1.0, so you could ask Cloud to execute this minor update.&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6649/read-json-column-in-oracle&amp;show=6650#a6650</guid>
<pubDate>Fri, 05 Aug 2022 05:53:40 +0000</pubDate>
</item>
<item>
<title>Answered: Can the Nomad database / tables have a different collation as the main db?</title>
<link>https://overflow.efficy.io/?qa=6644/can-the-nomad-database-tables-have-different-collation-main&amp;show=6646#a6646</link>
<description>&lt;p&gt;SQL Server collation has an impact on comparison of columns or values, for instance when your are searching and ordering data. It will impact the accent senstivity or the case sensitvity, these are two typical reasons why you want to change a collation.&lt;/p&gt;

&lt;p&gt;Imo, it's no problem if the customers wants to run a script to alter the collation on their received nomad database. It's getting more difficult if it needs to be handled by our Cloud.&lt;/p&gt;

&lt;p&gt;I don't expect issues with the replication.&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6644/can-the-nomad-database-tables-have-different-collation-main&amp;show=6646#a6646</guid>
<pubDate>Wed, 27 Jul 2022 11:02:44 +0000</pubDate>
</item>
<item>
<title>Answered: Query by Multi-Value</title>
<link>https://overflow.efficy.io/?qa=6555/query-by-multi-value&amp;show=6594#a6594</link>
<description>&lt;p&gt;Hi Duke,&lt;/p&gt;

&lt;p&gt;Here is an example of query generated by Efficy with a multivalue field :&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;select 
  ACTORROLES.NAME,
  ACTORROLES.F_PROJ_TYPES
from
  ACTORROLES ACTORROLES
where
((ACTORROLES.F_PROJ_TYPES like N'%;10031;%' or ACTORROLES.F_PROJ_TYPES like N'%;10033;%' or ACTORROLES.F_PROJ_TYPES like N'%;10005;%'))
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;So yes there is no other way than directly parse it in SQL.&lt;/p&gt;

&lt;p&gt;You can use STRING_SPLIT() function if you are on MSSQL server:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.microsoft.com/en-us/sql/t-sql/functions/string-split-transact-sql?view=sql-server-ver16&quot;&gt;https://docs.microsoft.com/en-us/sql/t-sql/functions/string-split-transact-sql?view=sql-server-ver16&lt;/a&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;select VALUE from string_split(CITY,';')
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6555/query-by-multi-value&amp;show=6594#a6594</guid>
<pubDate>Fri, 10 Jun 2022 17:13:55 +0000</pubDate>
</item>
<item>
<title>Answered: Sql query on acc_accounts - Field 'Name' not found</title>
<link>https://overflow.efficy.io/?qa=6489/sql-query-on-accaccounts-field-name-not-found&amp;show=6492#a6492</link>
<description>&lt;p&gt;Dear Henry,&lt;/p&gt;

&lt;p&gt;I think it is due to a column returned by your query that is also defined in standard gridColumn.txt. Since Efficy 2021 (12.0), the QueryResult.htm page is getting the grid definition from gridColumn.txt instead of grid/QueryResult.htm !&lt;/p&gt;

&lt;p&gt;You should not do a &quot;select *&quot; but instead specify the columns you need to display.&lt;br&gt;
I see that the error comes from the PHONE columns, which is await a column &quot;NAME&quot; : &lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://overflow.efficy.io/?qa=blob&amp;amp;qa_blobid=6686546656181126362&quot; alt=&quot;PHONE column def&quot;&gt;&lt;/p&gt;

&lt;p&gt;I have tried with the following query and it is working :&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;select 
K_USER,
USERCODE,
FULLNAME,
D_CREATE,
D_CHANGE,
KIND,
ISACTIVE,
CATEGORY,
AUTH_METHOD,
UPRIVILEGES,
EMAIL,
MAILSERVER,
MAILALIAS,
REGION,
K_WORKFLOW,
K_ROLE,
K_CONTACT,
/*PHONE,*/
ULIST,
LANGUAGE,
ISDEPARTMENT,
ISCONTACT,
TIMEZONE,
INITIALIZE,
K_FLEXMAIL,
CAMCARD,
SKILL,
TEAMKIND,
AUTH_2FA,
AUTOMAILUPLOADER
from acc_accounts
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6489/sql-query-on-accaccounts-field-name-not-found&amp;show=6492#a6492</guid>
<pubDate>Mon, 21 Mar 2022 07:28:41 +0000</pubDate>
</item>
<item>
<title>Answered: Timezone values</title>
<link>https://overflow.efficy.io/?qa=6283/timezone-values&amp;show=6333#a6333</link>
<description>&lt;p&gt;After a quick chat with the R&amp;amp;D team, it comes from the registry : &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The binary value TZI is interpreted to find these values. It contains :&lt;br&gt;
- Bias: Integer;&lt;br&gt;
- StandardBias: Integer;&lt;br&gt;
- DaylightBias: Integer;&lt;br&gt;
- StandardDate: TSystemTime;&lt;br&gt;
- DaylightDate: TSystemTime;&lt;/p&gt;

&lt;p&gt;So difficult to have a vision from the number stored in this field and the time zone&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6283/timezone-values&amp;show=6333#a6333</guid>
<pubDate>Fri, 22 Oct 2021 10:02:13 +0000</pubDate>
</item>
<item>
<title>Answered: Is it possible to log changes done on ACC_ACCOUNTS and ACC_GROUPS tables ?</title>
<link>https://overflow.efficy.io/?qa=6038/possible-log-changes-done-accaccounts-accgroups-tables&amp;show=6040#a6040</link>
<description>&lt;p&gt;It looks like I already answered the same question many years ago.&lt;/p&gt;

&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://overflow.efficy.io/?qa=622/changelog-for-conficy&amp;amp;show=622#q622&quot;&gt;https://overflow.efficy.io/?qa=622/changelog-for-conficy&amp;amp;show=622#q622&lt;/a&gt;&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6038/possible-log-changes-done-accaccounts-accgroups-tables&amp;show=6040#a6040</guid>
<pubDate>Thu, 22 Apr 2021 10:57:11 +0000</pubDate>
</item>
<item>
<title>Answered: Page Compression in SQL Server ( can Efficy work with this ?)</title>
<link>https://overflow.efficy.io/?qa=6019/page-compression-in-sql-server-can-efficy-work-with-this&amp;show=6022#a6022</link>
<description>&lt;p&gt;Does the customer really need the whole trace than has been logged for years?&lt;br&gt;
I already faced this SYS&lt;strong&gt;CHANGED volume issue for a customer.&lt;br&gt;
I first measured which tables were more traced.&lt;br&gt;
Then I proposed the customer to purge useless data, by removing the oldest one (+/-50% of SYS&lt;/strong&gt;CHANGED rows).&lt;br&gt;
Finally, I used such a statement :&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;SET NOCOUNT ON;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;DECLARE @r INT;&lt;/p&gt;

&lt;p&gt;SET @r = 1;&lt;/p&gt;

&lt;p&gt;WHILE @r &amp;gt; 0&lt;br&gt;
BEGIN&lt;br&gt;
  BEGIN TRANSACTION;&lt;/p&gt;

&lt;p&gt;DELETE TOP (10000) -- this will change&lt;br&gt;
    Sys&lt;em&gt;changed&lt;br&gt;
    WHERE D&lt;/em&gt;CHANGE &amp;lt; GETDATE() - 730 &lt;br&gt;
  SET @r = @@ROWCOUNT;&lt;/p&gt;

&lt;p&gt;COMMIT TRANSACTION;&lt;/p&gt;

&lt;p&gt;CHECKPOINT;&lt;br&gt;
END&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6019/page-compression-in-sql-server-can-efficy-work-with-this&amp;show=6022#a6022</guid>
<pubDate>Wed, 07 Apr 2021 15:55:52 +0000</pubDate>
</item>
<item>
<title>Answered: Adding new Products creates duplicate relation records</title>
<link>https://overflow.efficy.io/?qa=5935/adding-new-products-creates-duplicate-relation-records&amp;show=5937#a5937</link>
<description>&lt;p&gt;Did you update the &lt;code&gt;SYS_QUERY&lt;/code&gt; of for &quot;Company: linked products&quot; with the &lt;code&gt;K_RELATION&lt;/code&gt; column?&lt;/p&gt;

&lt;p&gt;If a query outputs identical records multiple times, it's because of a functionally (not technically) incorrect join. Maybe you joined &lt;code&gt;PROD_USER&lt;/code&gt;? That could for instance explain the differences you see between existing records and newly inserted.&lt;/p&gt;

&lt;p&gt;It's like 100% sure a custom related problem.&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5935/adding-new-products-creates-duplicate-relation-records&amp;show=5937#a5937</guid>
<pubDate>Wed, 03 Mar 2021 14:08:26 +0000</pubDate>
</item>
<item>
<title>Answered: LookupTableManager : Cannot fetch Lookup Table Values on table for oppo history</title>
<link>https://overflow.efficy.io/?qa=5876/lookuptablemanager-cannot-fetch-lookup-table-values-history&amp;show=5878#a5878</link>
<description>&lt;p&gt;Verify if the field &lt;code&gt;F_STRU_JUR_CODE_POSTAL&lt;/code&gt; in designer is correctly mapped with a lookup table + lookup field. I doubt it is.&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5876/lookuptablemanager-cannot-fetch-lookup-table-values-history&amp;show=5878#a5878</guid>
<pubDate>Wed, 10 Feb 2021 08:33:00 +0000</pubDate>
</item>
<item>
<title>Answered: Efficy 11.3.23072 - When launching a Template from the document, quicksearch popup for selecting template doesn't appear</title>
<link>https://overflow.efficy.io/?qa=5738/launching-template-document-quicksearch-selecting-template&amp;show=5759#a5759</link>
<description>&lt;p&gt;Hello Stijn,&lt;/p&gt;

&lt;p&gt;it's a know issue in build 11.3 r23072.&lt;/p&gt;

&lt;p&gt;If you look this &lt;a rel=&quot;nofollow&quot; href=&quot;https://overflow.efficy.io/?qa=5653/announcement-patch-for-efficy-11-3-build-r23072&quot;&gt;post&lt;/a&gt;, there a patch for this issue :) (still available on the FTP Partner).&lt;/p&gt;

&lt;p&gt;Alex.&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5738/launching-template-document-quicksearch-selecting-template&amp;show=5759#a5759</guid>
<pubDate>Fri, 11 Dec 2020 23:56:41 +0000</pubDate>
</item>
<item>
<title>Answered: SOAP Envelop from Qlik - API / SQL retrieving Mime64 encoded Data</title>
<link>https://overflow.efficy.io/?qa=5728/soap-envelop-from-qlik-api-sql-retrieving-mime64-encoded-data&amp;show=5748#a5748</link>
<description>&lt;p&gt;Hello&lt;/p&gt;

&lt;p&gt;Found the solution : transforming the XML result into a string using the cast function :&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; cast(
STUFF
(
(
select '|'+
(select F_VALUE from LK_BRAND_MARQUE L8 where L8.K_BRAND_MARQUE=BRANDS.F_MARQUE ) as brand1
from
COMPANIES COMPANIES,BRAN_COMP, BRANDS
where
COMPANIES.K_COMPANY = BRAN_COMP.K_COMPANY
and 
BRAN_COMP.K_BRAND = BRANDS.K_BRAND
and (BRANDS.F_CATEGORY='15')
and 
comp.K_COMPANY=COMPANIES.K_COMPANY
order by brand1
FOR XML PATH (''), TYPE).value('.', 'varchar(max)'), 1, 1, '') 
as VARCHAR(256)) as TRACTOR_BRAND,
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Patrice&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5728/soap-envelop-from-qlik-api-sql-retrieving-mime64-encoded-data&amp;show=5748#a5748</guid>
<pubDate>Wed, 09 Dec 2020 18:29:44 +0000</pubDate>
</item>
<item>
<title>Answered: Migration to Efficy 2021 : custom entity CRED vs standard entity CRED</title>
<link>https://overflow.efficy.io/?qa=5729/migration-efficy-2021-custom-entity-cred-standard-entity-cred&amp;show=5744#a5744</link>
<description>&lt;p&gt;Hhmm, that's bad luck... :-(&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;functional guideline&lt;/strong&gt; is to rename your custom entity and tables, giving priority to the new standard entities and to avoid further conflicts in the future.&lt;/p&gt;

&lt;p&gt;We are thinking about making an SQL Script to help with the rename of all dictionary data and alter table statements etc, but it's not going to be an easy job. You also need to alter macro and script files...&lt;/p&gt;

&lt;p&gt;This can easily take a few hours to align and test.&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5729/migration-efficy-2021-custom-entity-cred-standard-entity-cred&amp;show=5744#a5744</guid>
<pubDate>Wed, 09 Dec 2020 14:33:41 +0000</pubDate>
</item>
<item>
<title>Summary of DbStructure upgrade from 11.3.145 to 12.0.30</title>
<link>https://overflow.efficy.io/?qa=5650/summary-of-dbstructure-upgrade-from-11-3-145-to-12-0-30</link>
<description>&lt;p&gt;FYI, a high level overview of some notable data stucture changes when upgrading from 11.3 to 12.0. Should give an idea about the new entities and features.&lt;/p&gt;

&lt;p&gt;This is does not contain any of the many new and updated lookups.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;alter table [COMPANIES] add [TAGS] varchar(255) null
alter table [COMPANIES] add [PICTURE] image null
alter table [CONTACTS] add [TAGS] varchar(255) null
alter table [PROJECTS] add [INV_SETTINGS] ntext null
alter table [PROJECTS] add [TAGS] varchar(255) null
alter table [PROJ$MANAGEMENT] add [DISCOUNT] float null
alter table [PROJ$MANAGEMENT] add [PONUMBER] nvarchar(32) null
alter table [FILES] add [K_SIGNATURE] float null
alter table [PUBL$EMAILING] add [K_PROVIDER] float null
alter table [OPPORTUNITIES] add [INV_SETTINGS] ntext null
alter table [OPPORTUNITIES] add [TAGS] varchar(255) null
alter table [CASES] add [TAGS] varchar(255) null

alter table [PROF$EMAILING] add [K_PROVIDER] float null
alter table [PROF$EMAILING] add [SYNCHROPLAN] nvarchar(1024) null
alter table [PROF$EMAILING] add [D_LASTSYNC] datetime null
alter table [PROF$EMAILING] add [D_NEXTSYNC] datetime null

alter table [DOCU$INVOICING] add [D_SEND] datetime null
alter table [DOCU$INVOICING] add [D_PAID] datetime null
alter table [DOCU$INVOICING] add [TYPE] integer null
alter table [DOCU$INVOICING] add [KIND] integer null
alter table [DOCU$INVOICING] add [STATUS] integer null
alter table [DOCU$INVOICING] add [D_HOLD_UNTIL] datetime null
alter table [DOCU$INVOICING] add [D_FIRST_REMINDER] datetime null
alter table [DOCU$INVOICING] add [D_SECOND_REMINDER] datetime null
alter table [DOCU$INVOICING] add [D_FORMAL_NOTICE] datetime null
alter table [DOCU$INVOICING] add [D_OUTSTANDING] datetime null
alter table [DOCU$INVOICING] add [D_DUE] datetime null
alter table [DOCU$INVOICING] add [PONUMBER] nvarchar(32) null

alter table [ACTIONS] add [TAGS] varchar(255) null
alter table [ACTIONS] alter column [LOCATION] nvarchar(255) null

alter table [MAILS] add [COMMENTS] integer null

alter table [TIMESHEET] add [K_DOCUMENT] float null
alter table [TIMESHEET] add [INVOICABLE] varchar(1) not null default '1'

create table [SYS_INDUSTRIALINDEXES]
create table [LOG_CREDENTIALS]
create table [PROVIDERS]
create table [PROV_USER]
create table [CONT_PROV]

create table [COMP$INV_ISSUER]
create table [COMP$CUSTOMER]
create table [PROJ$RECURRING]

create table [CHATS]
create table [CHAT_USER]
create table [CHAT_COMP], [CHAT_CONT]...

create table [CREDENTIALS]
create table [CRED_USER]
create table [CRED_COMP], [CRED_CONT]...

create table [REACTIONS]
create table [REAC_USER]
create table [REAC_COMP], [REAC_CONT]...

create table [INVOICEBATCHES]
create table [INVB_USER]
create table [INVB_PROJ], [INVB_OPPO]...

create table [SIGNATURES]
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;So we can spot the structure for these features:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Entity tags&lt;/li&gt;
&lt;li&gt;Invoicing module&lt;/li&gt;
&lt;li&gt;Document Signing&lt;/li&gt;
&lt;li&gt;Credential management&lt;/li&gt;
&lt;li&gt;Business Chat and reactions&lt;/li&gt;
&lt;/ol&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5650/summary-of-dbstructure-upgrade-from-11-3-145-to-12-0-30</guid>
<pubDate>Thu, 15 Oct 2020 14:40:29 +0000</pubDate>
</item>
<item>
<title>Answered: Prevent adding records in SYS_CHANGED table for a specific user</title>
<link>https://overflow.efficy.io/?qa=5412/prevent-adding-records-syschanged-table-for-specific-user&amp;show=5503#a5503</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;In sys_tableviews you have a field LOGCHANGES which handles it.&lt;/p&gt;

&lt;p&gt;Otherwise you can disable it via the property Efficy.disableChangeLog (from 11.2) in serverJS&lt;/p&gt;

&lt;p&gt;Kr,&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5412/prevent-adding-records-syschanged-table-for-specific-user&amp;show=5503#a5503</guid>
<pubDate>Thu, 02 Jul 2020 13:18:30 +0000</pubDate>
</item>
<item>
<title>Answered: Error on DB Stagging  Error: ENTT-2572 Field &quot;CHANGE_VECTOR$$&quot;, datatype &quot;RAW&quot; not supported</title>
<link>https://overflow.efficy.io/?qa=5465/error-stagging-error-changevector-datatype-supported&amp;show=5473#a5473</link>
<description>&lt;p&gt;There was a MATERIALIZED VIEW LOG that contained this column.&lt;br&gt;
Dropping the view solved the issue.&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5465/error-stagging-error-changevector-datatype-supported&amp;show=5473#a5473</guid>
<pubDate>Wed, 03 Jun 2020 10:37:52 +0000</pubDate>
</item>
<item>
<title>Answered: I experienc(ed) a slow SQL Server connection setup from Efficy</title>
<link>https://overflow.efficy.io/?qa=5426/i-experienc-ed-slow-sql-server-connection-setup-from-efficy&amp;show=5427#a5427</link>
<description>&lt;p&gt;TCP/IP is Disabled By Default&lt;/p&gt;

&lt;p&gt;It turns out that a new SQL Server installation &lt;strong&gt;does not enable TCP/IP by default&lt;/strong&gt; and if you're using a standard connection string it uses named pipes.&lt;/p&gt;

&lt;p&gt;Setting up a connection could take +5 seconds&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://overflow.efficy.io/?qa=blob&amp;amp;qa_blobid=2827020779656045050&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;

&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://weblog.west-wind.com/posts/2018/Oct/26/Sql-Server-Slow-Connections-with-2-second-or-so-delay&quot;&gt;Source and configuration instructions&lt;/a&gt;&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5426/i-experienc-ed-slow-sql-server-connection-setup-from-efficy&amp;show=5427#a5427</guid>
<pubDate>Tue, 12 May 2020 06:43:12 +0000</pubDate>
</item>
<item>
<title>Answered: OFFSET of 1 between K_AUTH in ACC_ACCOUNT and K_AUTH in SYS_KEYGEN</title>
<link>https://overflow.efficy.io/?qa=5331/offset-of-between-kauth-accaccount-and-kauth-syskeygen&amp;show=5332#a5332</link>
<description>&lt;p&gt;This is because the application server adds the offset value in the sys_databases record, which is 1 by default.&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5331/offset-of-between-kauth-accaccount-and-kauth-syskeygen&amp;show=5332#a5332</guid>
<pubDate>Mon, 02 Mar 2020 08:40:30 +0000</pubDate>
</item>
<item>
<title>Problems with create index</title>
<link>https://overflow.efficy.io/?qa=5311/problems-with-create-index</link>
<description>&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;We have encountered an issue while creating indexes during an update on production.&lt;/p&gt;

&lt;p&gt;We delete and create a lot of index for Belins, for this we have a specific file for each entities. &lt;em&gt;(CREATE&lt;em&gt;CONTRACTS&lt;/em&gt;INDEXES.sql / CREATE&lt;em&gt;CONTACTS&lt;/em&gt;INDEXES.sql / etc.)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The cause of the issue was 2-fold:&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1)&lt;/strong&gt; The file for creation of the indexes was structured to do drops indexes first and then try to create them again.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;exec CUSTOM_GENERIC_PKG.DROP_INDEX_IF_EXISTS('CONTRACTS','CUSTOM_I_U_CNTR_NBR');
exec CUSTOM_GENERIC_PKG.DROP_INDEX_IF_EXISTS('CONTRACTS', ‘CUSTOM_I_CONTRACT_LIST ');
exec CUSTOM_GENERIC_PKG.DROP_INDEX_IF_EXISTS('CONTRACTS',’ CUSTOM_I_CONTR_WIDGET’);
…
create unique index CUSTOM_I_U_CNTR on CONTRACTS(f_source, nvl(f_cntr_nbr, f_prop_nbr));
create index CUSTOM_I_CONTRACT_LIST on CONTRACTS(OPENED, D_USED);
create index CUSTOM_I_CONTR_WIDGET on CONTRACTS(F_SOURCE, F_STATUS,K_USER);
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;2)&lt;/strong&gt; This update was done while all systems were still running, because this there was too much DML activity and recreating the index failed because it could not get an exclusive lock on the table.&lt;br&gt;
Create index statement : create index CUSTOM&lt;em&gt;I&lt;/em&gt;CONTR&lt;em&gt;WIDGET on CONTRACTS(F&lt;/em&gt;SOURCE, F&lt;em&gt;STATUS,K&lt;/em&gt;USER). &lt;br&gt;
It failed with the error: ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The solution for the issues described above found is:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1)&lt;/strong&gt; Write the creation of the index directly after dropping it. &lt;br&gt;
This ensures that if there is an error only 1 index is missing (most of our files are already written this way).&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;exec CUSTOM_GENERIC_PKG.DROP_INDEX_IF_EXISTS('CONTRACTS','CUSTOM_I_U_CNTR_NBR');
create unique index CUSTOM_I_U_CNTR on CONTRACTS(f_source, nvl(f_cntr_nbr, f_prop_nbr));
exec CUSTOM_GENERIC_PKG.DROP_INDEX_IF_EXISTS('CONTRACTS', ‘CUSTOM_I_CONTRACT_LIST ');
create index CUSTOM_I_CONTRACT_LIST on CONTRACTS(OPENED, D_USED);
exec CUSTOM_GENERIC_PKG.DROP_INDEX_IF_EXISTS('CONTRACTS',’ CUSTOM_I_CONTR_WIDGET’);
create index CUSTOM_I_CONTR_WIDGET on CONTRACTS(F_SOURCE, F_STATUS,K_USER);
…
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;2)&lt;/strong&gt; based on feedback from DBA when doing an index creation on an active system you can add the key word ONLINE to the create index statement. This changes the way oracle does the indexing (it no longer needs an lock on the table), still allowing DML statements to be done while the new index is being created. Do note this is slower depending on how much DML activity there is on the table (maybe only use it for standard Efficy tables or heavily used tables).&lt;br&gt;
For more info see: &lt;a rel=&quot;nofollow&quot; href=&quot;http://www.dba-oracle.com/t_rebuild_index_online.htm&quot;&gt;&lt;/a&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;http://www.dba-oracle.com/t_rebuild_index_online.htm&quot;&gt;http://www.dba-oracle.com/t_rebuild_index_online.htm&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3)&lt;/strong&gt; Launch only the delta of this index files, do not delete and recreate all index every time.&lt;/p&gt;

&lt;p&gt;I hope this helps avoid the same issues in the future.&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5311/problems-with-create-index</guid>
<pubDate>Thu, 13 Feb 2020 10:00:23 +0000</pubDate>
</item>
<item>
<title>Answered: Do 2 multivalues fields (such as OPPORTUNITIES.COMPETITORS) have at least one common value?</title>
<link>https://overflow.efficy.io/?qa=5283/multivalues-fields-opportunities-competitors-least-common&amp;show=5284#a5284</link>
<description>&lt;p&gt;Thanks for sharing Pierre!&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5283/multivalues-fields-opportunities-competitors-least-common&amp;show=5284#a5284</guid>
<pubDate>Fri, 31 Jan 2020 14:24:05 +0000</pubDate>
</item>
<item>
<title>Answered: Counting the number of times a template has been run</title>
<link>https://overflow.efficy.io/?qa=5179/counting-the-number-of-times-a-template-has-been-run&amp;show=5180#a5180</link>
<description>&lt;p&gt;Consultations &amp;amp; edit requests without modifications are never logged in the database, except the small update to the &lt;code&gt;D_USED&lt;/code&gt; field.&lt;/p&gt;

&lt;p&gt;Conclusion, there is no trace in the database. &lt;/p&gt;

&lt;p&gt;Only the logs of &lt;code&gt;Efficy&lt;/code&gt; or &lt;code&gt;EfficyServer&lt;/code&gt; could learn you how frequently a template was used in the last 14 days.&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5179/counting-the-number-of-times-a-template-has-been-run&amp;show=5180#a5180</guid>
<pubDate>Thu, 09 Jan 2020 12:23:45 +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>Answered: ODBC Questionmarks on import</title>
<link>https://overflow.efficy.io/?qa=4890/odbc-questionmarks-on-import&amp;show=5033#a5033</link>
<description>&lt;p&gt;This is a known old and unsolved issue of Microsoft ODBC driver for Excel which handles the XLSX, XLS, CSV and TXT files.&lt;/p&gt;

&lt;p&gt;All characters present in the data that are unicode pass through correctly, unless they are in the unicode multibyte range. &lt;/p&gt;

&lt;p&gt;Characters of languages such as Japanese Chinese Arabic Hebrew Russian Georgian Thai and so on, which use separate alphabets usually fall in those ranges, and their characters are unsupported by this driver and end up being imported as &quot;?&quot;.&lt;/p&gt;

&lt;p&gt;This is a Microsoft issue (rather incomplete unicode support) and unfortunately Efficy can not do anything to solve it. The issue only affects the ODBC driver, no the actual Excel application.&lt;/p&gt;

&lt;p&gt;The only way around it is to use a different ODBC driver such as the Microsoft Access driver or other database drivers which correctly handle those characters.&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4890/odbc-questionmarks-on-import&amp;show=5033#a5033</guid>
<pubDate>Thu, 14 Nov 2019 15:04:32 +0000</pubDate>
</item>
<item>
<title>Answered: Information about sys_changed due to doubles in chronos</title>
<link>https://overflow.efficy.io/?qa=4972/information-about-syschanged-due-to-doubles-in-chronos&amp;show=4973#a4973</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;
for your issue about duplicates maybe one or more screenshots could help.&lt;/p&gt;

&lt;p&gt;About SYS&amp;#95;CHANGED fields, I can give an explanation but it's just my observations, not a complete definition of this table.&lt;br&gt;
And I will show an example.&lt;/p&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;
K&amp;#95;TABLE : you can find the name of this table in SYS&amp;#95;TABLES.&lt;br&gt;
K&amp;#95;1 : entity primary key.&lt;br&gt;
K&amp;#95;2 : entity primary key. This value equals 0 when your K_TABLE can be divided by 100, when K&amp;#95;TABLE = XXX00. This value is greater than 0 when K&amp;#95;TABLE is a relation table like CONT&amp;#95;COMP.&lt;br&gt;
K&amp;#95;3 : it represents the K&amp;#95;FIELD in your entity. You can retrieve it in SYS&amp;#95;FIELDS. So, if you have modified 10 fields, you'll get at least 10 corresponding rows in SYS&amp;#95;CHANGED.&lt;br&gt;
OPERATION : the operation realized by the user. More details about this field : &lt;a rel=&quot;nofollow&quot; href=&quot;https://help.efficy.com/edn/dev/dbst_databasevalues#valuessyschangedoperation&quot;&gt;https://help.efficy.com/edn/dev/dbst_databasevalues#valuessyschangedoperation&lt;/a&gt;&lt;br&gt;
D&amp;#95;CHANGE : specifies when the operation was realized.&lt;br&gt;
USERNAME : specifies which user realized the operation.&lt;br&gt;
COMMENT : if the user has filled a field, COMMENT field will contain the value in most of the cases.&lt;br&gt;
MILLI : it's only for Oracle customers but I can't remember where I read this information.&lt;br&gt;
D&amp;#95;REPLIC : no information about this field.&lt;br&gt;
K&amp;#95;REPLICUSER : no information about this field.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;Here is an example and how to analyse this record :&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;K_TABLEK_1K_2K_3OPERATIOND_CHANGEUSERNAMECOMMENTMILLID_REPLICK_REPLICUSER
32010530A06/10/19Administratorhe'loooo95506/10/190
32010534P06/10/19Administrator195606/10/190

select * from sys_tables where k_table = 32010; -- = ACTI_COMP TABLE
select * from acti_comp where k_action = 5 and k_company = 3; -- K_1 = K_ACTION and K_2 = K_COMPANY
select * from sys_fields where k_table = 32010 and k_field = 4; -- K_3 = K_FIELD

Operation = &quot;A&quot;, so the user has created the relation between the action &quot;K_ACTION = 5&quot; (with subject = he'loooo) and the company &quot;K_COMPANY = 3&quot;.
Operation = &quot;P&quot;, a relation field has been filled. The field is &quot;MAIN&quot;. It specifies if the relation is main or not.
D_CHANGE = &quot;06/10/19&quot;.
USERNAME = &quot;Administrator&quot;.
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;
So, these lines can be read like that :&lt;/p&gt;

&lt;p&gt;06/10/19, the user &quot;Administrator&quot; added an ACTI&amp;#95;COMP relation between &quot;K&amp;#95;ACTION = 5&quot; and &quot;K&amp;#95;COMPANY = 3&quot;.&lt;br&gt;
This operation filled the field &quot;MAIN&quot; with the value &quot;1&quot;.&lt;/p&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;
Kr,&lt;/p&gt;

&lt;p&gt;Eric&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4972/information-about-syschanged-due-to-doubles-in-chronos&amp;show=4973#a4973</guid>
<pubDate>Wed, 30 Oct 2019 12:48:05 +0000</pubDate>
</item>
<item>
<title>Answered: indexes : SYS_CHANGED_CHRONOS vs SYS_CHANGED_CHRONOS2 performances</title>
<link>https://overflow.efficy.io/?qa=4939/syschangedchronos-syschangedchronos2-performances&amp;show=4957#a4957</link>
<description>&lt;p&gt;Hello Eric,&lt;/p&gt;

&lt;p&gt;The index &lt;code&gt;SYS_CHANGED_CHRONOS2&lt;/code&gt; was added in June 2018 after feedback from our Cloud team.&lt;br&gt;
The index was suggested as a &quot;missing index&quot; by the Microsoft SQL Server running in the Cloud environment (at the time primarily on Efficy 10SP2 and 10SP2+ databases). &lt;/p&gt;

&lt;p&gt;It is quite possible that this index is useful for SQL Server but not for Oracle.&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4939/syschangedchronos-syschangedchronos2-performances&amp;show=4957#a4957</guid>
<pubDate>Wed, 23 Oct 2019 18:38:15 +0000</pubDate>
</item>
<item>
<title>Answered: Operation ApplyUpdates</title>
<link>https://overflow.efficy.io/?qa=4927/operation-applyupdates&amp;show=4928#a4928</link>
<description>&lt;p&gt;Correct, the ApplyUpdates (a.k.a. CommitChanges) happens between BeforeCommit and AfterCommit.&lt;/p&gt;

&lt;p&gt;The database tables of the Document edit context are updated (&lt;code&gt;DOCUMENTS&lt;/code&gt;, &lt;code&gt;DOCU_USER&lt;/code&gt;, &lt;code&gt;DOCU_COMP&lt;/code&gt;, &lt;code&gt;DOCU_CONT&lt;/code&gt;, ..., &lt;code&gt;FILES&lt;/code&gt;, and possible category tables).&lt;br&gt;
Also the &lt;code&gt;SYS_CHANGED&lt;/code&gt; table is updated with the changes.&lt;/p&gt;

&lt;p&gt;Before the commit on &lt;code&gt;FILES&lt;/code&gt;, for each modified file the CRC is computed (if not provided as field), and, if ImageMagick and GhostScript are installed also the thumbnail is generated.&lt;br&gt;
This can be slow if the document contains complex PDF files. Since Efficy 11.3 version the PDF thumbnail is created in a thread with a configurable time-out, so you can now limit the time of the operation.&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4927/operation-applyupdates&amp;show=4928#a4928</guid>
<pubDate>Thu, 17 Oct 2019 13:16:06 +0000</pubDate>
</item>
<item>
<title>Answered: DB Upgrade - missing database schema</title>
<link>https://overflow.efficy.io/?qa=3763/db-upgrade-missing-database-schema&amp;show=4839#a4839</link>
<description>&lt;p&gt;Hi Stéphane,  &lt;/p&gt;

&lt;p&gt;How did-you solved the problem ?&lt;br&gt;
I have the same kind of things.&lt;/p&gt;

&lt;p&gt;For an upgrade, the db have been placed on a new server, DB USer name and Db name has changed.&lt;/p&gt;

&lt;p&gt;First we have do this with the following config:&lt;br&gt;
DB on Dev database server, and Efficy on my local computer.&lt;br&gt;
Upgrade the DB with upgradedb.exe generate exactly the same error you said (functions used in view are not prefixed by the schema)&lt;br&gt;
But, upgrade with conficy is working good,  i have check the log and the functions ware prefixed correctly.&lt;/p&gt;

&lt;p&gt;Second, we have do the same on with the following config:&lt;br&gt;
DB on Acc database server, and efficy on Acc server.&lt;br&gt;
Have the same error with both upgradedb.exe, and conficy.&lt;/p&gt;

&lt;p&gt;Have you an idea of whats is wrong ?&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3763/db-upgrade-missing-database-schema&amp;show=4839#a4839</guid>
<pubDate>Mon, 30 Sep 2019 12:08:59 +0000</pubDate>
</item>
<item>
<title>Answered: Error when UpgradeDB tries to add a similar constraint (twice!!!) which conflicts with Oracle</title>
<link>https://overflow.efficy.io/?qa=4622/error-upgradedb-tries-similar-constraint-conflicts-oracle&amp;show=4624#a4624</link>
<description>&lt;p&gt;I assume that you have a custom category named &lt;code&gt;CONT$EMPLOYEE&lt;/code&gt; and that comes in conflict with the standard category (&lt;code&gt;K_TABLE=11100&lt;/code&gt;). I think it was added first in Efficy 10, based on the D_CREATE=6/12/2016&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4622/error-upgradedb-tries-similar-constraint-conflicts-oracle&amp;show=4624#a4624</guid>
<pubDate>Wed, 31 Jul 2019 08:03:58 +0000</pubDate>
</item>
<item>
<title>Answered: How to create a table space and user for Efficy in Oracle?</title>
<link>https://overflow.efficy.io/?qa=4607/how-to-create-a-table-space-and-user-for-efficy-in-oracle&amp;show=4608#a4608</link>
<description>&lt;p&gt;Create first the tablespace, then a User with the following rights.&lt;br&gt;
Use this user to create the database through the Efficy Designer&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;// Creates the physical file on Disk
create tablespace EFFICY datafile 'D:\DB\ORACLE\EFFICY.dbf' size 50M autoextend on;

// Create a user and associate it with your tablespace
CREATE USER EFFICY PROFILE &quot;DEFAULT&quot; IDENTIFIED BY &quot;{password}&quot; DEFAULT TABLESPACE &quot;EFFICY&quot; TEMPORARY TABLESPACE &quot;TEMP&quot; ACCOUNT UNLOCK;

// Add various rights
GRANT CREATE VIEW TO EFFICY;

GRANT UNLIMITED TABLESPACE TO EFFICY;

GRANT CONNECT TO EFFICY;

GRANT EXECUTE_CATALOG_ROLE TO EFFICY;

GRANT RESOURCE TO EFFICY;

GRANT SELECT_CATALOG_ROLE TO EFFICY;
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4607/how-to-create-a-table-space-and-user-for-efficy-in-oracle&amp;show=4608#a4608</guid>
<pubDate>Mon, 29 Jul 2019 06:26:24 +0000</pubDate>
</item>
<item>
<title>Answered: Create new indexes in tables</title>
<link>https://overflow.efficy.io/?qa=4408/create-new-indexes-in-tables&amp;show=4409#a4409</link>
<description>&lt;p&gt;All custom database objects that you add should be prefixed with &lt;code&gt;CUSTOM_&lt;/code&gt;.&lt;br&gt;
This includes indexes, triggers, functions, procedures and views&lt;/p&gt;

&lt;p&gt;Tables and fields don't need this constraint.&lt;/p&gt;

&lt;p&gt;If you forget this prefix, a DbUpgrade will drop every unkown database object in the Efficy schema.&lt;/p&gt;

&lt;p&gt;It's also used in this &lt;a rel=&quot;nofollow&quot; href=&quot;https://help.efficy.com/extras//projectguides/data_sync_utility_differences/#preparing_the_database&quot;&gt;DataSynchro example&lt;/a&gt; for index &lt;code&gt;CUSTOM_IDX_F_EXTKEY&lt;/code&gt; &lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4408/create-new-indexes-in-tables&amp;show=4409#a4409</guid>
<pubDate>Wed, 05 Jun 2019 07:37:13 +0000</pubDate>
</item>
<item>
<title>Answered: Where is the SSO information stored as of Efficy 11?</title>
<link>https://overflow.efficy.io/?qa=4375/where-is-the-sso-information-stored-as-of-efficy-11&amp;show=4376#a4376</link>
<description>&lt;p&gt;Hi Ken&lt;/p&gt;

&lt;p&gt;This is stored in &lt;code&gt;ACC_AUTH&lt;/code&gt;. If you want to see the data of Adminstrator (&lt;code&gt;K_USER=2&lt;/code&gt;), filter with these conditions:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;select USERNAME, KIND from ACC_AUTH where K_TABLE=1000 and K_1=2
&lt;/code&gt;&lt;/pre&gt;

&lt;ol&gt;
&lt;li&gt;&lt;code&gt;KIND=1002&lt;/code&gt; is SSO&lt;/li&gt;
&lt;li&gt;&lt;code&gt;KIND=1003&lt;/code&gt; is BEID&lt;/li&gt;
&lt;li&gt;&lt;code&gt;KIND=1004&lt;/code&gt; is LDAP&lt;/li&gt;
&lt;li&gt;&lt;code&gt;KIND=2001&lt;/code&gt; is Qlik&lt;/li&gt;
&lt;/ol&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4375/where-is-the-sso-information-stored-as-of-efficy-11&amp;show=4376#a4376</guid>
<pubDate>Tue, 28 May 2019 09:04:16 +0000</pubDate>
</item>
<item>
<title>Answered: What are the SYS_FIELDS columns PUBLISH and TRANSLATE</title>
<link>https://overflow.efficy.io/?qa=4232/what-are-the-sysfields-columns-publish-and-translate&amp;show=4254#a4254</link>
<description>&lt;p&gt;The TRANSLATE field has appeared in Efficy 11.2 and indeed maps to the &quot;translated&quot; property of the field in the Designer. This activates the field contents translation in Efficy, which will generate in the edit window a blue button next to a field to enter the translated field values. For this to work, you also need to add the Translation detail in the edit context of the entity (there is a warning message that will tell you this).&lt;/p&gt;

&lt;hr&gt;

&lt;p&gt;The PUBLISH field has been present since the start. It tells the query builder that the field can be used in the so-called &quot;Published&quot; part of the query, which are the fields that you want to show in a query for all the records for which the user doesn't have the security access (and are normally invisible for the user).&lt;/p&gt;

&lt;p&gt;In the options of a query definition you can put a &quot;PublishedRows&quot; boolean value that activates the Published part. This will generate a query with an additional &quot;union all&quot; which selects the fields that have the PUBLISH property set for all the records that are normally invisbible for the user.&lt;/p&gt;

&lt;p&gt;AFAIK this feature is not really used.&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4232/what-are-the-sysfields-columns-publish-and-translate&amp;show=4254#a4254</guid>
<pubDate>Thu, 16 May 2019 10:01:14 +0000</pubDate>
</item>
<item>
<title>Answered: How can we use table SYS_INDEXES and related Db tools</title>
<link>https://overflow.efficy.io/?qa=4203/how-can-we-use-table-sysindexes-and-related-db-tools&amp;show=4208#a4208</link>
<description>&lt;p&gt;I can try to answer the other questions.&lt;/p&gt;

&lt;p&gt;SYS__INDEXES is empty and actually not used at all in the database. We should probably remove it from the database. In the database structure XML files there is a SYS_INDEXES collection that contains the list of the default database table indexes, and the database table was supposed to mirror this, but in the end this was not implemented.&lt;/p&gt;

&lt;p&gt;The Tool menu has disappeared from the DbEditor in Efficy 11, the menu no longer fits in the visual design of the form. I'll make a change so that you can still enable it by pressing a key combination (e.g. Ctrl-M).&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4203/how-can-we-use-table-sysindexes-and-related-db-tools&amp;show=4208#a4208</guid>
<pubDate>Thu, 09 May 2019 12:41:34 +0000</pubDate>
</item>
<item>
<title>Answered: 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&amp;show=4166#a4166</link>
<description>&lt;p&gt;With the help of Kristof, this would be the commands to be used. Login and database name have to be replaced of course.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;USE [master]
GO

-- Create new SQL Server login: Replace the database name [Efficy112] 
-- and select a good password
CREATE LOGIN [unify] WITH PASSWORD=N'***************', DEFAULT_DATABASE=[Efficy112], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
GO

-- Replace the database name [Efficy112]
USE [Efficy112]
GO

-- Create a new user in the Efficy DB mapped with the SQL Server Login, 
-- select the default schema [admin]
CREATE USER [unify] FOR LOGIN [unify] WITH DEFAULT_SCHEMA=[admin]
GO

-- Grant only &quot;select&quot; permissions on the Unify view
GRANT SELECT ON [ADMIN].[CUSTOM_UNIFY_PHONES_EXPORT] TO [unify]
GO
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4165/3rd-party-needs-read-only-access-to-efficy-database&amp;show=4166#a4166</guid>
<pubDate>Thu, 25 Apr 2019 06:32:47 +0000</pubDate>
</item>
<item>
<title>Answered: Issue creating new contact + action in 11.2</title>
<link>https://overflow.efficy.io/?qa=4124/issue-creating-new-contact-action-in-11-2&amp;show=4125#a4125</link>
<description>&lt;p&gt;Don't know for the first issue, but the second issue about the ActiRelation is that the DbUpgrade never touched system dictionary that is marked as custom=1. Since Efficy 11, the Edit Action context is extended with Acti Relations, so tasks can be inserted from an appointment.&lt;/p&gt;

&lt;p&gt;TO be very specific, add the following in &lt;code&gt;SYS_ENTITYVIEWS.TABLEVIEWS&lt;/code&gt; where &lt;code&gt;NAME='ActiEdit'&lt;/code&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;;Acti_Acti=Acti
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4124/issue-creating-new-contact-action-in-11-2&amp;show=4125#a4125</guid>
<pubDate>Fri, 19 Apr 2019 18:36:57 +0000</pubDate>
</item>
<item>
<title>Answered: How to determine K_RELATION in DOCU_PROD using a direct database-update</title>
<link>https://overflow.efficy.io/?qa=3855/determine-krelation-docuprod-using-direct-database-update&amp;show=3858#a3858</link>
<description>&lt;p&gt;Although we don't recommend to insert data directly with SQL inserts, in some cases it could give maximum performance.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;K_RELATION&lt;/code&gt; should not be unique in the table, just the combination of the two key fields + &lt;code&gt;K_RELATION&lt;/code&gt; needs to be unique. Use a positive integer value.&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3855/determine-krelation-docuprod-using-direct-database-update&amp;show=3858#a3858</guid>
<pubDate>Mon, 14 Jan 2019 14:31:24 +0000</pubDate>
</item>
<item>
<title>Answered: Error on table view of companies</title>
<link>https://overflow.efficy.io/?qa=3409/error-on-table-view-of-companies&amp;show=3466#a3466</link>
<description>&lt;p&gt;The &lt;code&gt;R_VIEWS&lt;/code&gt; are regenerated with the DbUpgrade process becaus&lt;br&gt;
e they are based on the dictionary configuration from &lt;code&gt;SYS_FIELDS&lt;/code&gt;. For every lookup and multivalue, the &lt;code&gt;R_&lt;/code&gt; column is appended containing the text label instead of the key.&lt;/p&gt;

&lt;p&gt;Proceed by running a DbUpgrade to force recreation of all &lt;code&gt;R_VIEWS&lt;/code&gt;&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3409/error-on-table-view-of-companies&amp;show=3466#a3466</guid>
<pubDate>Tue, 14 Aug 2018 06:41:22 +0000</pubDate>
</item>
<item>
<title>What does 'isactiveparam' mean in &lt;#USERLINK&gt;?</title>
<link>https://overflow.efficy.io/?qa=3420/what-does-isactiveparam-mean-in-userlink</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;Does anyone knows how parameter isactiveparam is translated in sys&lt;em&gt;queries inside tag &quot;&amp;lt;#USERLINK&amp;gt;&quot;? is it indicating the possibility to pass an argument (param1 maybe) to set &quot;ISACTIVE&quot; to 0 or 1 on calling the defined sys&lt;/em&gt;query? &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;#USERLINK table=&quot;DOCUMENTS&quot; usertable=&quot;DOCU_USER&quot; key=&quot;K_DOCUMENT&quot; isactiveparam=&quot;true&quot;&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And is there a documentation somewhere about these special tags in queris and their parameters?&lt;br&gt;
Thank you in advance for your help.&lt;br&gt;
Best Regards.&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3420/what-does-isactiveparam-mean-in-userlink</guid>
<pubDate>Thu, 26 Jul 2018 10:51:36 +0000</pubDate>
</item>
<item>
<title>More info required about the phonetic (sounds like) algorithm</title>
<link>https://overflow.efficy.io/?qa=3211/more-info-required-about-the-phonetic-sounds-like-algorithm</link>
<description>&lt;p&gt;Efficy calculates the value for the &lt;code&gt;PHONETIC&lt;/code&gt; field using the &lt;code&gt;NAME&lt;/code&gt; field as input parameter. I can see some correlation with the SQL Server function &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.microsoft.com/en-us/sql/t-sql/functions/soundex-transact-sql?view=sql-server-2017&quot;&gt;Soundex&lt;/a&gt;, but it's clearly not the same algorithm.&lt;/p&gt;

&lt;p&gt;We have an existing &lt;strong&gt;Oracle&lt;/strong&gt; database with millions of contacts that were initially inserted using SQL scripts. For all contacts that didn't receive an update yet, the &lt;code&gt;PHONETIC&lt;/code&gt; column is still empty.&lt;/p&gt;

&lt;p&gt;Is there a way to update this column without passing through the API, like with a SQL function?&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;NAME          FIRSTNAME PHONETIC     Soundex(NAME)
------------- --------- ------------ -------------
Pauwels       Ludovic   p042         P420
Van der Aalst Tine      v05930690423 V500
Simpson       Homer     s051205      S512
Peeters       Frans     p03062       P362
Van der Elst  Mieke     v05930690423 V500
Simpson       Bart      s051205      S512
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Used SQL query:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;select K_CONTACT, NAME, FIRSTNAME, PHONETIC, 
soundex(NAME) as 'Soundex(NAME)' from CONTACTS
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3211/more-info-required-about-the-phonetic-sounds-like-algorithm</guid>
<pubDate>Tue, 29 May 2018 13:38:22 +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>SYS_FIELDS : DataType, EditStyle and Usage and do they influence the FullSearch Method?</title>
<link>https://overflow.efficy.io/?qa=2893/sysfields-datatype-editstyle-influence-fullsearch-method</link>
<description>&lt;p&gt;Dear all,&lt;/p&gt;

&lt;p&gt;I would like to know what are all the letters in Datatype, Usage and EditStyle are used for, some on them I know, but for other I don't. And is there any combinations that are forbidden in Efficy ?&lt;/p&gt;

&lt;p&gt;And most important are the EditStyle influencing the Full Search Method ? I ask that question because 2 fields in a customer database araise error when searching using the Full Search Method. Those 2 fields are of DATAYPE = I, Usage = R and EDITStyle = K .. I checked with standard fields with DataType = I and Usage = R and the only difference I saw was on Edit Style which was = L.&lt;br&gt;
The issue is that those 2 fields are considered like &quot;string fields&quot; in the FullSearch Method.&lt;br&gt;
PS : we are using Efficy 10 R7987&lt;/p&gt;

&lt;p&gt;EditStyle I found in Effiy : &lt;br&gt;
U = ?&lt;br&gt;
P = ?&lt;br&gt;
K = AlphaNumerical Lookup (I think)&lt;br&gt;
M = Memo&lt;br&gt;
C = Currency (I think)&lt;br&gt;
J = Lookup with search (I think)&lt;br&gt;
A = ?&lt;br&gt;
E = Edit Box (I think)&lt;br&gt;
L = Standard HTML Lookup&lt;br&gt;
G = ?&lt;/p&gt;

&lt;p&gt;DataType I found in Efficy:&lt;br&gt;
H&lt;br&gt;
I = Integer&lt;br&gt;
D = Date&lt;br&gt;
M = Memo&lt;br&gt;
? = ???&lt;br&gt;
A = Alphanumeric&lt;br&gt;
B = Boolean&lt;br&gt;
C = Currency (float)&lt;br&gt;
T = ?&lt;br&gt;
N = Numerical (float)&lt;br&gt;
L = Lookup by Key (Integer)&lt;br&gt;
S = Small Integer&lt;/p&gt;

&lt;p&gt;Usage I found in Efficy:&lt;br&gt;
EMPTY (' ') &amp;gt; ?&lt;br&gt;
V = ?&lt;br&gt;
R = Lookup by key (I think)&lt;br&gt;
P = Virtual fields calling an SQL Function (I think)&lt;br&gt;
K = Key of a table&lt;br&gt;
Q = ?&lt;br&gt;
C = Calculated : the calculation rule in RULETEXT column (I think)&lt;br&gt;
L = Alphanumerical Lookup (I think) &lt;/p&gt;

&lt;p&gt;Best Regards,&lt;br&gt;
Stéphane RONCIN&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2893/sysfields-datatype-editstyle-influence-fullsearch-method</guid>
<pubDate>Fri, 19 Jan 2018 10:59:13 +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>1st import script for a DataSynchro</title>
<link>https://overflow.efficy.io/?qa=2818/1st-import-script-for-a-datasynchro</link>
<description>&lt;p&gt;Hi all!&lt;/p&gt;

&lt;p&gt;I wanted to train me with scripting (import data from Excel file with Data Synchro)&lt;br&gt;
 Excel:&lt;br&gt;
Company;External ID;COMPANY;Contact external Id;FIRSTNAME;LASTNAME&lt;br&gt;
1 | COMP &amp;amp; CIE | 1 | BERNARD | A.&lt;br&gt;
1 | COMP &amp;amp; CIE | 2 | BART | B.&lt;br&gt;
2 | IKEA | 3 | ABDUL | C.&lt;br&gt;
2 | IKEA | 4 | WORLD | D.&lt;/p&gt;

&lt;p&gt;Objectives: insert this data in the DB, link the Contact to the Company, and link all these new entities to the same Publication&lt;/p&gt;

&lt;p&gt;this script&lt;br&gt;
I have some questions:&lt;br&gt;
- Does my script respect good practices&lt;br&gt;
- I have difficulties to understanding the difference between Relation (with AddLink2) and Details (with InsertDetail2). For me Detail is a &quot;type&quot; of relation&lt;br&gt;
A Detail is the sub Entity in the selected Entity right?&lt;br&gt;
- in InsertDetail2 what does the last parameter?? I don't undersand the &quot;automatically link the contact’s main company&quot;&lt;/p&gt;

&lt;p&gt;Finally, DataSync Tool thorws an Exception when i run it:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[15:52:44.744]     4 Records Found
[15:52:44.744]   Handling Record &quot;MAXIME&quot;...
[15:52:52.076] 
[15:52:52.076] *** ERROR ***
[15:52:52.076] Error while creating or modifying destination record.
[15:52:52.076] Error: WKFL-2142 Error while executing Script &quot;EOleException&quot; at line 16 char 5.
Message: &quot;SLC_Publ_Cont_750
Cannot add a new Relation

ErrorContext
=============================     
EDatabaseError 0
L'instruction INSERT est en conflit avec la contrainte FOREIGN KEY &quot;FK_PUBLICATIONS_PUBL_CONT1&quot;. Le conflit s'est produit dans la base de données &quot;TESTFORMATION&quot;, table &quot;ADMINFORMATION.PUBLICATIONS&quot;, column 'K_PUBLICATION'

Error
=============================     
EEfficyTableViewException 1116
(ENTT-1616) SLC_Publ_Cont_750
Cannot add a new Relation
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;my script:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var PUBLICATION_KEY = 2;

function EfficyImportRecord(DataStore) {
  var companyKey = DataStore.FindExistingEntity('Comp');
  var compEdit = Database.OpenEditContext(ntComp, companyKey);
  try {
    var dsComp = Database.GetMasterDataSet(compEdit, 0);
    dsComp.Edit();
    companyKey = dsComp.FieldByName('K_COMPANY').AsFloat; // Dans le cas où on crée un nouvel enregistrement, sinon la valeur était déjà initialisée par la méthode DataStore.FindExistingEntity
    dsComp.FieldByName('F_EXTERNALID').AsString = DataStore.AsString('Company External ID');
    dsComp.FieldByName('NAME').AsString = DataStore.AsString('COMPANY');

    // Pour identifier clairement les sociétés impactées par la datasynchro, la lier à une publication add-hoc
    Database.AddLink2(ntPubl, ntComp, PUBLICATION_KEY, companyKey, true);


    Database.CommitChanges(compEdit, false);
  } 
  finally
  {
    Database.CloseContext(compEdit);
  }


  var contKey = DataStore.FindExistingEntity('Cont');
  var contEdit = Database.OpenEditContext(ntCont, contKey);
  try {
    var dsCont = Database.GetMasterDataSet(contEdit, 0);
    dsCont.Edit();
    contKey = dsCont.FieldByName('K_CONTACT').AsFloat;
    dsCont.FieldByName('F_EXTERNALID').AsString = DataStore.AsString('Contact external Id');
    dsCont.FieldByName('NAME').AsString = DataStore.AsString('LASTNAME');
    dsCont.FieldByName('FIRSTNAME').AsString = DataStore.AsString('FIRSTNAME');

    Database.InsertDetail2(contEdit, ntPubl, PUBLICATION_KEY, false);  //passer false a true??
    Database.InsertDetail2(contEdit, ntComp, compKey, false);

    Database.CommitChanges(contEdit, false);
  } 
  finally
  {
    Database.CloseContext(contEdit);
  }


  return true
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Thanks a lot!&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2818/1st-import-script-for-a-datasynchro</guid>
<pubDate>Thu, 07 Dec 2017 15:30:13 +0000</pubDate>
</item>
<item>
<title>How to recover the date and user of the last modification after a data synchro</title>
<link>https://overflow.efficy.io/?qa=2711/how-recover-date-user-last-modification-after-data-synchro</link>
<description>&lt;p&gt;I performed a data realignment datasynchro of documents to update one field.&lt;br&gt;
Consequently, the date of last modification (D_CHANGE) as well as the code of the user who performed the last modification (CHANGEDBY) are (almost) lost.&lt;/p&gt;

&lt;p&gt;I wrote a statement to recover these 2 values.&lt;br&gt;
Can anybody (comfortable with sql statements) validate my statement?&lt;br&gt;
Is there a simpler way to achieve this recovery?&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;update documents d set 
D_CHANGE = (
  SELECT d_change from ( -- Before Last date of update or insertion of the record
    select ROWNUM AS RNUM, sc.*  
    from
    (
      select sc.d_change
      from SYS_CHANGED sc 
      where k_table = 31000 and k_1 = d.K_DOCUMENT
      and operation in ('B', 'A') -- UPDATE OR INSERT
      order by d_change, milli desc
    ) sc
  )
  where RNUM = 2 -- Before Last INSERT or UPDATE operation
),
CHANGEDBY = (
  SELECT username as username from ( -- Before Last user that updated or inserted the record
    select ROWNUM AS RNUM, sc.* 
    from
    (
      select sc.username
      from SYS_CHANGED sc 
      where k_table = 31000 and k_1 = d.K_DOCUMENT
      and operation in ('B', 'A') -- UPDATE OR INSERT
      order by d_change, milli desc
    ) sc
  )
  where RNUM = 2 -- Before Last INSERT or UPDATE operation
)
where k_document in ( -- Select document keys linked to my publication, for which the last modification has been done by the admin user
    select d.K_DOCUMENT 
    from docu_publ dp
    inner join documents d on d.K_document = dp.K_document
    where dp.k_publication = 4394 and d.changedby = 'ADMINEBIS'
);
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2711/how-recover-date-user-last-modification-after-data-synchro</guid>
<pubDate>Fri, 29 Sep 2017 15:36:55 +0000</pubDate>
</item>
</channel>
</rss>