<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions in Database</title>
<link>https://overflow.efficy.io/?qa=questions/developers/database</link>
<description>Powered by Question2Answer</description>
<item>
<title>Where are the &quot;Follow&quot; notification details stored?</title>
<link>https://overflow.efficy.io/?qa=7075/where-are-the-follow-notification-details-stored</link>
<description>&lt;p&gt;We have two ways to configure notifications. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Default notifications:&lt;br&gt;
&lt;img src=&quot;https://overflow.efficy.io/?qa=blob&amp;amp;qa_blobid=8225178292203744388&quot; alt=&quot;enter image description here&quot;&gt;&lt;/li&gt;
&lt;li&gt;Follow (follow a specific record): &lt;br&gt;
&lt;img src=&quot;https://overflow.efficy.io/?qa=blob&amp;amp;qa_blobid=17621620532942460118&quot; alt=&quot;enter image description here&quot;&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The default notification details are saved in ACC_RIGHTS table.  &lt;a rel=&quot;nofollow&quot; href=&quot;https://overflow.efficy.io/?qa=2069/default-notification-settings-where-are-they-stored&amp;amp;show=2070#a2070&quot;&gt;Explained in this thread&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Where are saved the &quot;Follow&quot; configuration details? &lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=7075/where-are-the-follow-notification-details-stored</guid>
<pubDate>Mon, 22 Jul 2024 14:48:55 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;p&gt;Hello,&lt;br&gt;
Trying to save an action in the application i'm faced with this error message &lt;br&gt;
&quot;ORA-01653: unable to extend table ADMINxxxx.ACTIONS by 1024 in tablespace EFFxxxx&quot; &lt;/p&gt;

&lt;p&gt;after researching a little i found &lt;a rel=&quot;nofollow&quot; href=&quot;https://stackoverflow.com/questions/27129376/ora-01653-unable-to-extend-table-by-in-tablespace-ora-06512&quot;&gt;&lt;strong&gt;This&lt;/strong&gt;&lt;/a&gt; thread requiring adding storage files to the tablespace, i was wondering if any one has a solution &lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=7012/01653-unable-extend-adminolvea-actions-tablespace-effolvea</guid>
<pubDate>Wed, 20 Dec 2023 13:20:57 +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>Upgrade from Oracle to SQL Server</title>
<link>https://overflow.efficy.io/?qa=6754/upgrade-from-oracle-to-sql-server</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;We have a customer that wants to upgrade his Efficy From Oracle database to SqlServer Database.&lt;/p&gt;

&lt;p&gt;Do we have a manual to do this kind of upgrade please? and how long should we estimate this?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6754/upgrade-from-oracle-to-sql-server</guid>
<pubDate>Thu, 10 Nov 2022 10:21:24 +0000</pubDate>
</item>
<item>
<title>LOGCHANGES selected fields for logging</title>
<link>https://overflow.efficy.io/?qa=6724/logchanges-selected-fields-for-logging</link>
<description>&lt;p&gt;When activating the LOGCHANGES on the TABLEVIEW &quot;Time&quot; in &lt;code&gt;SYS_TABLEVIEWS&lt;/code&gt;, the saved or changed &lt;code&gt;K_PROJECT&lt;/code&gt; is not saved in &lt;code&gt;SYS_CHANGED&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;what defines that this field isn't logged ?&lt;br&gt;
Can we activate it ?&lt;/p&gt;

&lt;p&gt;In the TableView no specific fields are selected:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://overflow.efficy.io/?qa=blob&amp;amp;qa_blobid=14611727426373814277&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6724/logchanges-selected-fields-for-logging</guid>
<pubDate>Mon, 17 Oct 2022 19:03:20 +0000</pubDate>
</item>
<item>
<title>Read JSON column in Oracle</title>
<link>https://overflow.efficy.io/?qa=6649/read-json-column-in-oracle</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;does anyone know how to read a JSON value in Oracle. I need this to represent the value based on the value set in the JSON. But until now I'm not been able to read the JSON object with Oracle.&lt;/p&gt;

&lt;p&gt;I hope someone can help me with this.&lt;/p&gt;

&lt;p&gt;Best regards,&lt;br&gt;
Jeroen&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6649/read-json-column-in-oracle</guid>
<pubDate>Thu, 04 Aug 2022 07:21:19 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;p&gt;Dear all,&lt;/p&gt;

&lt;p&gt;The customer wants their NOMAD database in a different collation, or at least some columns as the main db. Could this cause problems? I think so, but I don't know for sure.&lt;/p&gt;

&lt;p&gt;Best regards,&lt;/p&gt;

&lt;p&gt;Rob&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</guid>
<pubDate>Tue, 26 Jul 2022 15:44:23 +0000</pubDate>
</item>
<item>
<title>Query by Multi-Value</title>
<link>https://overflow.efficy.io/?qa=6555/query-by-multi-value</link>
<description>&lt;p&gt;I have created a Look Up table called Micromarket with two columns: Name, Industry&lt;/p&gt;

&lt;p&gt;I've added a multi-value field to Companies linked to this Look Up table on the &quot;Name&quot; column. &lt;/p&gt;

&lt;p&gt;What I would like to do is query companies based on Industry&lt;/p&gt;

&lt;p&gt;Is there an easy way of doing this? I have started to create the query in raw SQL but the values are stored as semi-colon delimited. Are then any functions to help with the lookup or do I have to write the raw SQL to split and resolve? &lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6555/query-by-multi-value</guid>
<pubDate>Fri, 27 May 2022 08:20:59 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;p&gt;Hi everyone,&lt;/p&gt;

&lt;p&gt;Since Efficy 2021, if I create this simple sql query 'select * from acc_accounts' in Efficy, I get this weird error : &lt;/p&gt;

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

&lt;p&gt;Where does this error come from, there is not even a 'Name' field in this table... ??&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6489/sql-query-on-accaccounts-field-name-not-found</guid>
<pubDate>Fri, 18 Mar 2022 16:30:11 +0000</pubDate>
</item>
<item>
<title>Timezone values</title>
<link>https://overflow.efficy.io/?qa=6283/timezone-values</link>
<description>&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;Can someone tell me what are the values present in the timezone field (in ACC_ACCOUNTS and in ACTIONS)&lt;/p&gt;

&lt;p&gt;I guess that 172 is for UTC+1 - Brussels...&lt;/p&gt;

&lt;p&gt;But on which table can I find all these values?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6283/timezone-values</guid>
<pubDate>Tue, 07 Sep 2021 08:15:57 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;p&gt;For a customer, we have an interface that is creating the users from their Active Directory.&lt;/p&gt;

&lt;p&gt;We would like to log the changes to the tables &lt;code&gt;ACC_ACCOUNTS&lt;/code&gt; and &lt;code&gt;ACC_GROUPS&lt;/code&gt; in order to check if the modification done are done from the Efficy Designer by a specific user or by the interface we created.&lt;/p&gt;

&lt;p&gt;Is it possible to log those changes ?&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6038/possible-log-changes-done-accaccounts-accgroups-tables</guid>
<pubDate>Thu, 22 Apr 2021 08:01:03 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;p&gt;Customer wants to apply Page Compression on the SYS_CHANGED table to win space.&lt;br&gt;
Can they do this or will Efficy have problems with this ?&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</guid>
<pubDate>Wed, 07 Apr 2021 14:11:23 +0000</pubDate>
</item>
<item>
<title>Adding new Products creates duplicate relation records</title>
<link>https://overflow.efficy.io/?qa=5935/adding-new-products-creates-duplicate-relation-records</link>
<description>&lt;p&gt;I got an issue after adding K_ RELATION to PROD_ COMP.&lt;br&gt;
Adding existing products to a company: no issues.&lt;br&gt;
Adding &lt;strong&gt;new&lt;/strong&gt; products: creates an duplicate relation record:&lt;/p&gt;

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

&lt;pre&gt;&lt;code&gt;[Select]
PRODUCTS.K_PRODUCT
PRODUCTS.D_CREATE
PRODUCTS.OPENED
PRODUCTS.NAME
PRODUCTS.REFERENCE
PRODUCTS.FAMILY
PRODUCTS.MEMO
PRODUCTS.MEMOFORMATTED
PRODUCTS.F_DESCRIPTION
PRODUCTS.F_CARTONSIZE
PRODUCTS.F_COMPLEX
PRODUCTS.F_CERTIFICATE
PRODUCTS.F_PRINTQUALITYSALES
PRODUCTS.F_BOARDCODE
PRODUCTS.F_BOARDDESCRIPTION
PRODUCTS.F_COATING
PRODUCTS.F_PRODUCTSTATUS
PRODUCTS.F_SLEQFACTOR
PROD_COMP.K_RELATION
PROD_COMP.D_CHANGE
PROD_COMP.F_LK_FILLED_PRODUCT
PROD_COMP.F_POTENTIAL_VOLUME
PROD_COMP.F_ADDRESSABLE_VOLUME
PROD_COMP.F_VOLUME_AP
PROD_COMP.F_PRICE_LEVEL
PROD_COMP.F_LK_COMP_PROD_STATUS
PROD_COMP.F_COMP_PROD_COMMENTS
PROD_COMP.F_COMP_PROD_SHAPE
PROD_COMP.K_COMPANY hidden

[From]
PROD_COMP
PROD_COMP PRODUCTS

[Where]
PROD_COMP.K_COMPANY = 0

[Orderby]
PRODUCTS.NAME

[Columns]
MENU,NAME,REFERENCE,D_CREATE,D_CHANGE,F_DESCRIPTION
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Other entities do not have this issue, such as Prod _Oppo, Prod _Case&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5935/adding-new-products-creates-duplicate-relation-records</guid>
<pubDate>Wed, 03 Mar 2021 13:20:16 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I have an error when i try to see the &quot;Show Change History&quot; of Opportunity. (Efficy 11.3)&lt;br&gt;
&lt;img src=&quot;https://overflow.efficy.io/?qa=blob&amp;amp;qa_blobid=7603963602025686839&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;

&lt;p&gt;Any idea on what's going wrong ?&lt;/p&gt;

&lt;p&gt;Quentin PRIGENT&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5876/lookuptablemanager-cannot-fetch-lookup-table-values-history</guid>
<pubDate>Tue, 09 Feb 2021 18:57:13 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;p&gt;&lt;img src=&quot;https://overflow.efficy.io/?qa=blob&amp;amp;qa_blobid=14932875319858787804&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;

&lt;p&gt;When trying to launch a Template from the document, the quicksearch popup for selecting the template doesn't appear. The spinner spins for a second, like he should, no errors in console or nothing in network debugging either.&lt;/p&gt;

&lt;p&gt;It's not custom folder related.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is there something in the Database that can influence this ?&lt;/strong&gt;&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5738/launching-template-document-quicksearch-selecting-template</guid>
<pubDate>Wed, 09 Dec 2020 11:37:15 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I want to migrate an Efficy to the latest version Efficy 2021.&lt;br&gt;
But I have an issue : I have a custom entity with shortname CRED ; in Efficy 2021, a new standard entity uses the shortname CRED.&lt;/p&gt;

&lt;p&gt;Is there a procedure to deal with this ?&lt;/p&gt;

&lt;p&gt;Best regards,&lt;br&gt;
Sébastien&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</guid>
<pubDate>Tue, 08 Dec 2020 09:38:25 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;p&gt;Hello&lt;/p&gt;

&lt;p&gt;I'm using with success the API provided by Efficy to retrieve data in our Qlik server (on premises) :&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;     &amp;lt;SOAP-ENV:Envelope xmlns:efficy='http://xxxx.efficy.com' xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope'&amp;gt;
        &amp;lt;SOAP-ENV:Body&amp;gt;
        &amp;lt;efficy:logon database='xxxx' user='xxx' password='xxxx'/&amp;gt;
        &amp;lt;efficy:api&amp;gt;
        &amp;lt;datacontainer id='1' operation='executesqlquery' recordcount=''&amp;gt;
        &amp;lt;sql&amp;gt;
    select
    COMP.K_COMPANY,
    COMP.F_SAP,

    TRACTOR_BRAND = STUFF

 (
    (
    select '|'+
    (select F_VALUE from LK_BRAND_MARQUE L8 where L8.K_BRAND_MARQUE=BRANDS.F_MARQUE)
    from
    COMPANIES COMPANIES,BRAN_COMP, BRANDS
    where
    COMPANIES.K_COMPANY = BRAN_COMP.K_COMPANY
    and
    BRAN_COMP.K_BRAND = BRANDS.K_BRAND
    and
    comp.K_COMPANY=COMPANIES.K_COMPANY

    FOR XML PATH (''), TYPE).value('.', 'varchar(max)'), 1, 1, '')

from COMPANIES COMP, BRAN_COMP
    where COMP.K_COMPANY = BRAN_COMP.K_COMPANY 
    group by comp.k_company, COMP.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;Unfortunately, the above SQL encodes the Tractor_Brand column into Base64 (all other columns are strings). &lt;br&gt;
As a result the output is encoded in MIME64.&lt;br&gt;
Example : one output record is &quot;Sk9ITiBERUVSRXxORVcgSE9MTEFORA==&quot; when the original data is &quot;JOHN DEERE|NEW HOLLAND&quot;&lt;/p&gt;

&lt;p&gt;I've tried to convert the Tractor&lt;em&gt;Brand on the SQL side using cast(TRACTOR&lt;/em&gt;BRAND as nvarchar(max)) as TRACTOR&lt;em&gt;BRAND&lt;/em&gt;text . But the result is the same in the rest connector.&lt;/p&gt;

&lt;p&gt;So, I wonder if this could be a limitation of the api.&lt;br&gt;
Any advise would be welcome...&lt;/p&gt;

&lt;p&gt;thanks&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</guid>
<pubDate>Tue, 08 Dec 2020 08:23:53 +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>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</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;One of the clients has multiple datasychros. Some of them running every hour. So there are a lot of records ( over 2 billions) accumulating in &lt;code&gt;SYS_CHANGED&lt;/code&gt;. &lt;br&gt;
I'd like to avoid adding records into &lt;code&gt;SYS_CHANGED&lt;/code&gt; for the user.&lt;br&gt;
Is it possible ? &lt;/p&gt;

&lt;p&gt;Thanks,&lt;br&gt;
Hamid&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5412/prevent-adding-records-syschanged-table-for-specific-user</guid>
<pubDate>Thu, 02 Jul 2020 12:37:11 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;p&gt;when trying to dump a Oracle Efficy 11.3 DB I get the following error :&lt;/p&gt;

&lt;p&gt;Connecting to XXXXX&lt;br&gt;
  Error: ENTT-2572 Field &quot;CHANGE_VECTOR$$&quot;, datatype &quot;RAW&quot; not supported&lt;/p&gt;

&lt;p&gt;I cannot find a view / custom table or such in the DB that has this column&lt;/p&gt;

&lt;p&gt;Neither I can find something similar in the ALL_OBJECTS of Oracle&lt;/p&gt;

&lt;p&gt;I un-selected the copy custom and iscustom options in the Dbstagging Tool&lt;/p&gt;

&lt;p&gt;How can this be troubleshooted?&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5465/error-stagging-error-changevector-datatype-supported</guid>
<pubDate>Tue, 02 Jun 2020 08:24:42 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;p&gt;&lt;strong&gt;Symptoms:&lt;/strong&gt;&lt;br&gt;
The creation of a new connection from Efficy 11 and it's utilities is very slow. I use SQL Server 2017+ version. Once a connection is made, queries are very fast.&lt;/p&gt;

&lt;p&gt;The same slow query runs fine when I execute it in SQL Server Management studio.&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</guid>
<pubDate>Tue, 12 May 2020 06:42:59 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;p&gt;Hi Everyone,&lt;/p&gt;

&lt;p&gt;Is it normal that the last K&lt;em&gt;AUTH in ACC&lt;/em&gt;AUTH and the K&lt;em&gt;AUTH in SYS&lt;/em&gt;KEYGEN are not the same ?&lt;br&gt;
There is an offset of 1  with the value in SYS&lt;em&gt;KEYGEN lower than the value in ACC&lt;/em&gt;AUTH.&lt;/p&gt;

&lt;p&gt;for reproduce,  create a brand new database,  and juste check in the tables.&lt;br&gt;
i've try to create some users, with native and ldap authentification to generate multiple line in ACC&lt;em&gt;AUTH,  and systematically, K&lt;/em&gt;AUTH of SYS_KEYGEN is one lower.&lt;/p&gt;

&lt;p&gt;tested on versions 11.2.19857 and 11.3.20009&lt;/p&gt;

&lt;p&gt;Regards,&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5331/offset-of-between-kauth-accaccount-and-kauth-syskeygen</guid>
<pubDate>Fri, 28 Feb 2020 12:47:48 +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>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</link>
<description>&lt;p&gt;I implemented an Oracle function :&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;create or replace FUNCTION CUSTOM_MULTIVALUES_MATCH(value_1 VARCHAR2, value_2 VARCHAR2)
RETURN NUMBER AS
value_exists NUMBER;
BEGIN
with value1(value1) as (
select regexp_substr(value_1,'[^;]+', 1, level) value1
from dual
connect by regexp_substr(value_1, '[^;]+', 1, level) is not null
)
,value2(value2) as (
select regexp_substr(value_2,'[^;]+', 1, level) value1
from dual
connect by regexp_substr(value_2, '[^;]+', 1, level) is not null
)
select (case when count(*) &amp;gt; 0 then 1 else 0 end) as &quot;Match&quot;
into value_exists
from value1 v1
inner join value2 v2 on v1.value1 = v2.value2;
return value_exists;
END;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Here is the result of the function for some test values :&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;CUSTOM_MULTIVALUES_MATCH(';1;2;',';1;') = 1
CUSTOM_MULTIVALUES_MATCH(';1;',';1;2;') = 1
CUSTOM_MULTIVALUES_MATCH(';1;2;',';3;4;') = 0
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Here is a query returning the opportunities having at least one competitor in common with a given opportunity:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;select o1.K_OPPORTUNITY, o1.NAME, o1.R_COMPETITORS
from 
R_OPPORTUNITIES o1, 
OPPORTUNITIES o2
where 
o1.K_OPPORTUNITY != o2.K_OPPORTUNITY
and o2.K_OPPORTUNITY = 2549
and CUSTOM_MULTIVALUES_MATCH(o1.COMPETITORS, o2.COMPETITORS) = 1;
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5283/multivalues-fields-opportunities-competitors-least-common</guid>
<pubDate>Fri, 31 Jan 2020 14:05:10 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;p&gt;Is it possible to count the number of times a template has been run?&lt;br&gt;
Is this logged someway in the database?&lt;/p&gt;

&lt;p&gt;The last used is updated, but I see no trace of this in SYS_CHANGED.&lt;/p&gt;

&lt;p&gt;Is there a way to obtain this Info from the database ?&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</guid>
<pubDate>Thu, 09 Jan 2020 12:04:07 +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>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</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I am currently investigating an issue with the chronos in efficy 11.2 and i was wondering what the meaning of the different columns are in the SYS_CHANGED table.&lt;br&gt;
Is this information in the guides (i haven't seem to locate any)? Can someone explain them maybe?&lt;/p&gt;

&lt;p&gt;My issue is that i have a lot of doubles in the chronos and i can't seem to pinpoint why. I did need to run initSysChanged utility, can that be the problem? Does the utility simply add entries and doesn't take existing records in regard (i did check in the database but i can't find double entries)?&lt;/p&gt;

&lt;p&gt;Thanks for any information.&lt;/p&gt;

&lt;p&gt;Ken&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4972/information-about-syschanged-due-to-doubles-in-chronos</guid>
<pubDate>Tue, 29 Oct 2019 16:30:59 +0000</pubDate>
</item>
<item>
<title>indexes : SYS_CHANGED_CHRONOS vs SYS_CHANGED_CHRONOS2 performances</title>
<link>https://overflow.efficy.io/?qa=4939/syschangedchronos-syschangedchronos2-performances</link>
<description>&lt;p&gt;Hi everyone,&lt;/p&gt;

&lt;p&gt;before giving the context and my observations, here is my question : for what kind of queries the SYS&amp;#95;CHANGED&amp;#95;CHRONOS and SYS&amp;#95;CHANGED&amp;#95;CHRONOS2 indexes are created ?&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;Yesterday, I observed that the chronos detail was really slow to load.&lt;/p&gt;

&lt;p&gt;In the query logs, the chronos detail has generated one query per selected entity (chronos detail options).&lt;br&gt;
The idea is to get the primary key of each entity linked to the entity.&lt;br&gt;
There is no other query in the logs about chronos detail.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;So, I guess, but I can’t confirm it without proof, that the primary keys from the previous queries are used by the following SYS&amp;#95;CHANGED queries :&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;select K_TABLE, D_CHANGE, USERNAME, OPERATION, K_1, K_2, K_3, MILLI,
&quot;COMMENT&quot; from &quot;GERM&quot;.&quot;SYS_CHANGED&quot; where ((K_1 = :key and K_TABLE in
(:param1)) or (K_2 = :key and K_TABLE in (:param2, :param3, :param4)))
and (D_CHANGE &amp;gt;= :mindate) and (D_CHANGE &amp;lt; :maxdate) order by D_CHANGE,
K_TABLE, K_2, MILLI, OPERATION;
&lt;/code&gt;&lt;/pre&gt;

&lt;hr&gt;

&lt;pre&gt;&lt;code&gt;select distinct USERNAME, D_CHANGE from &quot;GERM&quot;.&quot;SYS_CHANGED&quot; where
((K_1 = :key and K_TABLE in (:param1)) or (K_2 = :key and K_TABLE in
(:param2, :param3, :param4))) and (D_CHANGE &amp;gt;= :mindate) and (D_CHANGE
&amp;lt; :maxdate) order by D_CHANGE DESC;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Each of these queries exists in a lot of versions because of a variation in the number of parameters for K&amp;#95;TABLE field.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;When I consult the execution plan of the above queries (Oracle - SQL Developer), I observe that the first one is using SYS&amp;#95;CHANGED_CHRONOS (K&amp;#95;2, K&amp;#95;TABLE, D&amp;#95;CHANGE, USERNAME) index and the second one, SYS&amp;#95;CHANGED&amp;#95;CHRONOS2 (D&amp;#95;CHANGE, K&amp;#95;TABLE, K&amp;#95;1, K&amp;#95;2) index.&lt;br&gt;
For each query, I can consult the execution plan with SYS&amp;#95;CHANGED&amp;#95;CHRONOS or SYS&amp;#95;CHANGED&amp;#95;CHRONOS2 index.&lt;br&gt;
The cost is almost the same between these two indexes. So, the choice between them seems to be a really complicated choice for Oracle.&lt;br&gt;
In the database, SYS&amp;#95;CHANGED&amp;#95;CHRONOS is better in a lot of situations.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;So, for what kind of queries the SYS&amp;#95;CHANGED&amp;#95;CHRONOS and SYS&amp;#95;CHANGED&amp;#95;CHRONOS2 indexes are created ?&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;KR,&lt;/p&gt;

&lt;p&gt;Eric&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4939/syschangedchronos-syschangedchronos2-performances</guid>
<pubDate>Tue, 22 Oct 2019 09:38:06 +0000</pubDate>
</item>
<item>
<title>Operation ApplyUpdates</title>
<link>https://overflow.efficy.io/?qa=4927/operation-applyupdates</link>
<description>&lt;p&gt;I audited an Efficy installation where 80% of the slowest operations are actually ApplyUpdate operations for documents. Here is an example of an operation that took 105 seconds.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;S926 C247: (105690 ms (0)) ApplyUpdates(true,DocuEdit,11154981,ref=0)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I have some questions. I want to understand what actually happens underneath.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is this DB operation executed between &lt;strong&gt;BeforeCommitDocu&lt;/strong&gt; and &lt;strong&gt;AfterCommitDocu&lt;/strong&gt;?&lt;/li&gt;
&lt;li&gt;Is this purely the insert statements in &lt;code&gt;DOCUMENTS, DOCU_*, FILES and SYS_CHANGED?&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Could Db workflow be responsible for slow ApplyUpdates?&lt;/li&gt;
&lt;li&gt;Could it be related to waiting time on ImageMagick or GS?&lt;/li&gt;
&lt;li&gt;Any other child operations that could cause these delayes?&lt;/li&gt;
&lt;/ul&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4927/operation-applyupdates</guid>
<pubDate>Thu, 17 Oct 2019 12:59:06 +0000</pubDate>
</item>
<item>
<title>ODBC Questionmarks on import</title>
<link>https://overflow.efficy.io/?qa=4890/odbc-questionmarks-on-import</link>
<description>&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;We're trying this with an 11.2 customer: &lt;a rel=&quot;nofollow&quot; href=&quot;https://overflow.efficy.com/?qa=4077/add-chinese-characters-with-datasynchro-odbc-limitation&quot;&gt;Chinese characters in odbc datasynchro&lt;/a&gt; There is still text being replaced by question marks (?). Propably because of some Eastern European letters. Is there a way to get these right? We tried OEM, ANSI and 65001 as characterset in the schema.ini but to no avail.&lt;/p&gt;

&lt;p&gt;Best regards,&lt;br&gt;
Rob&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4890/odbc-questionmarks-on-import</guid>
<pubDate>Thu, 10 Oct 2019 14:45:28 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;pre&gt;&lt;code&gt;delete from CONT$EMPLOYEE where K_CONTACT not in (select K_CONTACT from CONTACTS) and K_CONTACT is not null
alter table CONT$EMPLOYEE add constraint FK_CONTACTS_CONT$EMPLOYEE foreign key (K_CONTACT) references CONTACTS (K_CONTACT) on delete cascade
delete from CONT$EMPLOYEE where K_CONTACT not in (select K_CONTACT from CONTACTS) and K_CONTACT is not null
**alter table CONT$EMPLOYEE add constraint FK_CONTACTS_CONT$EMPLOYEE2 foreign key (K_CONTACT) references CONTACTS (K_CONTACT) on delete cascade**
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Efficy tries to add a 2nd constraint (&lt;strong&gt;FK&lt;em&gt;CONTACTS&lt;/em&gt;CONT$EMPLOYEE2&lt;/strong&gt;) with the same restrictions, which Oracle doesn't allow, because there is already one existing (just created before - FK&lt;em&gt;CONTACTS&lt;/em&gt;CONT$EMPLOYEE)&lt;/p&gt;

&lt;p&gt;dropping the constraints before the upgrade doesn't help and no other constraints or indexes are existing. &lt;/p&gt;

&lt;p&gt;The tool tries to add twice the same constraint (with only the 2 added in the name).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://overflow.efficy.com/?qa=blob&amp;amp;qa_blobid=186579789075654481&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4622/error-upgradedb-tries-similar-constraint-conflicts-oracle</guid>
<pubDate>Wed, 31 Jul 2019 06:59:18 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;p&gt;I want to create a blank Efficy DB on Oracle, how to I proceed?&lt;/p&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</guid>
<pubDate>Mon, 29 Jul 2019 06:25:22 +0000</pubDate>
</item>
<item>
<title>Create new indexes in tables</title>
<link>https://overflow.efficy.io/?qa=4408/create-new-indexes-in-tables</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;Last Friday, I created several Indexes on different tables. Indeed, we need those indexes to optimize the matching on the customer ID during the datasync and when the customer uses the API.&lt;br&gt;
Today all those indexes have disappeared. What's happen between last Friday and today? An upgrade DB was launched. It seems this action destroys those customs indexes.&lt;br&gt;
Is it the standard behavior? If it is, how to create custom indexes that are not destroy on each db upgrade?&lt;/p&gt;

&lt;p&gt;thanks for the help,&lt;/p&gt;

&lt;p&gt;Laurent&lt;/p&gt;

&lt;p&gt;PS: the &quot;Tools&quot; option into the dbeditor didn't exist anymore into Efficy11.x&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4408/create-new-indexes-in-tables</guid>
<pubDate>Wed, 05 Jun 2019 07:31:51 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;Might be a simple question, but where is the sso information stored in the database (see printscreen)?&lt;/p&gt;

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

&lt;p&gt;In versions prior to 11 this was stored in ACC_ACCOUNTS (SSOID) but this isn't the case as of version 11.&lt;/p&gt;

&lt;p&gt;Thank you for the clarification.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br&gt;
Ken&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4375/where-is-the-sso-information-stored-as-of-efficy-11</guid>
<pubDate>Tue, 28 May 2019 08:33:54 +0000</pubDate>
</item>
<item>
<title>Delete a custom entity</title>
<link>https://overflow.efficy.io/?qa=4326/delete-a-custom-entity</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;In one of my project, my customer create a custom entity into the designer that we really need to destroy before going live.&lt;/p&gt;

&lt;p&gt;I need to destroy all fields, tables, relation tables, forms, ... linked to this entity. There no data inside and no code mention it into Efficy or into the custom. &lt;/p&gt;

&lt;p&gt;How to do it properly?&lt;/p&gt;

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

&lt;p&gt;Laurent&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4326/delete-a-custom-entity</guid>
<pubDate>Thu, 23 May 2019 15:05:17 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;p&gt;What are the columns &lt;code&gt;PUBLISH&lt;/code&gt; and &lt;code&gt;TRANSLATE&lt;/code&gt; in dictionary table &lt;code&gt;SYS_FIELDS&lt;/code&gt;? &lt;/p&gt;

&lt;p&gt;For &lt;code&gt;TRANSLATE&lt;/code&gt;, I assume it can be mapped to the &lt;a rel=&quot;nofollow&quot; href=&quot;https://help.efficy.com/edn/admin/rlhs_efficy11_2&quot;&gt;Translated field values&lt;/a&gt; as described in the release notes of 11.2. But how can this be used?&lt;/p&gt;

&lt;p&gt;What is the purpose of &lt;code&gt;PUBLISH&lt;/code&gt;? &lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4232/what-are-the-sysfields-columns-publish-and-translate</guid>
<pubDate>Mon, 13 May 2019 11:47:30 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;p&gt;The table &lt;code&gt;SYS_INDEXES&lt;/code&gt; is empty by default, how can this be used by projects?&lt;/p&gt;

&lt;p&gt;This &lt;a rel=&quot;nofollow&quot; href=&quot;https://overflow.efficy.com/?qa=1220/dbeditor-new-functionnality-indexes&amp;amp;show=1221#a1221&quot;&gt;overflow post&lt;/a&gt; mentions an addition of &quot;Tools item&quot; to DbEditor, but this is not there anymore. At least I don't see it&lt;/p&gt;

&lt;p&gt;We have some other DB utilities, what can we do with these utilities and services? They don't start or don't have an interactive GUI:&lt;br&gt;
&lt;code&gt;DBMaintenance.exe&lt;/code&gt; and &lt;code&gt;DbCommandTools.exe&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Thank you&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</guid>
<pubDate>Wed, 08 May 2019 14:35:26 +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>Issue creating new contact + action in 11.2</title>
<link>https://overflow.efficy.io/?qa=4124/issue-creating-new-contact-action-in-11-2</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;A cloud customer (VCK) has just upgraded to efficy 11.2 build 16718 but there is a problem when the client tries to create a new contact (see screenshot below).&lt;/p&gt;

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

&lt;p&gt;This only happens when creating a new contact and only for the contact module.&lt;/p&gt;

&lt;p&gt;Another issue happens when trying to create a new appointment (not task, so only when using the agenda). See screen below.&lt;/p&gt;

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

&lt;p&gt;There is very little custom and the problem persists without custom.&lt;br&gt;
My guess is there is a problem with the database structure but i can't seem to find the causes. I have upgraded the DB with the designer but no luck.&lt;/p&gt;

&lt;p&gt;Any advice would be welcome.&lt;/p&gt;

&lt;p&gt;Thx.&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4124/issue-creating-new-contact-action-in-11-2</guid>
<pubDate>Fri, 19 Apr 2019 12:43:27 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;p&gt;I'm trying to insert rows in the table DOCU_PROD using an external program. So I'm not able to use Efficy-functions. &lt;/p&gt;

&lt;p&gt;All columns are quite logical, but I'm not sure &lt;strong&gt;how to determine the content of K_RELATION&lt;/strong&gt;? Can I just define a random value? Or is it (as the name of the column suggests) a relation to another table? As far as I have seen the values do not need to be unique. &lt;/p&gt;

&lt;p&gt;Edit: I tried to set K&lt;em&gt;RELATION = 0. But when trying to edit the document afterwards it results in the following error: Vind detail met sleutel &quot;97&quot; en relatie &quot;612593356&quot; niet terug&lt;br&gt;
so somehow there must be a logical way to deterime K&lt;/em&gt;RELATION. Does someone know?&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3855/determine-krelation-docuprod-using-direct-database-update</guid>
<pubDate>Fri, 11 Jan 2019 20:39:27 +0000</pubDate>
</item>
<item>
<title>DB Upgrade - missing database schema</title>
<link>https://overflow.efficy.io/?qa=3763/db-upgrade-missing-database-schema</link>
<description>&lt;p&gt;Dear all,&lt;/p&gt;

&lt;p&gt;For a customer we changed the DB User name, in order to make it worked, we have : &lt;br&gt;
1- change the DB Schema (following the post : &lt;a rel=&quot;nofollow&quot; href=&quot;https://overflow.efficy.com/?qa=807/mssql-server-how-to-change-owner-name&quot;&gt;https://overflow.efficy.com/?qa=807/mssql-server-how-to-change-owner-name&lt;/a&gt; )&lt;br&gt;
2- change the Efficy Admin name in ACC_ACCOUNTS&lt;br&gt;
3- change the login in Alias manager&lt;/p&gt;

&lt;p&gt;We then kill the com+ and we tried to do an upgrade DB but we encountered issues with the SQL function because they are not prefixed with the schema.&lt;/p&gt;

&lt;p&gt;We look at a local DBUpgrade script and in my local environnment the function are prefixed for instance below we can see &lt;strong&gt;ADMINR14832.&lt;/strong&gt;GET&lt;em&gt;OPPORTUNI&lt;/em&gt;COMPETITORS_VAL ... on the customer database we dont have the prefix. &lt;/p&gt;

&lt;p&gt;So my question is how the UpgradeDb.exe tool is retrieving the database Schema, in order for us to check if we missed something in DB ?&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;create view R_OPPORTUNITIES as select OPPORTUNITIES.*,
(select FULLNAME from ACC_ACCOUNTS L1 where L1.K_USER=OPPORTUNITIES.MANAGER) as R_MANAGER,
(select STATUS from LK_OPPO_STATUS L2 where L2.K_OPPO_STATUS=OPPORTUNITIES.STATUS) as R_STATUS,
(select NATURE from LK_OPPO_NATURE L3 where L3.K_OPPO_NATURE=OPPORTUNITIES.NATURE) as R_NATURE,
ADMINR14832.GET_OPPORTUNI_COMPETITORS_VAL(COMPETITORS) as R_COMPETITORS,
(select COMPETITOR from LK_OPPO_COMPET L4 where L4.K_OPPO_COMPET=OPPORTUNITIES.LOSTAGAINST) as R_LOSTAGAINST,
(select CODE from LK_CURRCY L5 where L5.K_CURRCY=OPPORTUNITIES.CURRCY) as R_CURRCY from OPPORTUNITIES
go
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3763/db-upgrade-missing-database-schema</guid>
<pubDate>Mon, 17 Dec 2018 16:53:03 +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>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>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>