Knowledgebase
Get rid of duplicated tables
Posted by Carmina Garcia on 05 June 2019 02:50 PM
  1. Why are some object duplicated in Visual Expert?

 

When VE analyzes your code, it may find some references with a prefix indicating the schema containing your objects (schema.table for instance). Other references may not include such a prefix.

 

For example,  the code could include these 2 phrases  

  1. Select phone, address from schema1.customer

  2. Select name, email from customer

 

In the second phrase the schema is not specified with a prefix.

In this case, VE assigns a default schema to the table called <default_schema>

As a consequence, the table list will includes these 2 tables:

  1. schema1.customer

  2. <default_schema>.customer

 

Maybe this result is not accurate, because there is only 1”customer” table in the database. In this case, you fix this issue by defining the value of the default schema.

 

In the example above, if the default schema is set to “schema1”, then visual expert will create only the table schema1.customer after the code analysis.

 

  1. How to remove duplicated objects?

 

First, you find the name of the database and schema containing the duplicated objects.

Then, you use these value as default database and schema in your VE project.

 

a. Open a list of objects in Visual Expert and select some duplicated objects.

DoubledTables


b. Click “Locate” in the navigation bar : the database and schema containing the objects are displayed.

Locate

 

c. note down the server, database and schema names.

 

d. go to Settings > Select Source code > Default DB Items > enter the names noted above.

DefaultItems

 

e. click OK, and close the window.

 

f. refresh your source code analysis.

RefreshAnalyze

Once the analysis process is completed, check that the objects are no longer duplicated. 

Result



(0 vote(s))
Helpful
Not helpful

Comments (0)
Help Desk by Novalys