Follow

Replace one subject with another in a Termbase

You can use SQL commands to replace one subject in a Termbase with another.

Subject numbers

Déjà Vu X3 does not store the name of a subject in a Termbase; instead, it stores the subject's code number. When you open a Termbase in Déjà Vu X3, it looks this number up to find the name of the subject, and then displays the name. Therefore, when you modify a Termbase using SQL, you must use the subject's code number in the commands you use.

How to find a subject's code

You can see the list of subjects that Déjà Vu X3 uses by accessing to menu option File>Options, and then selecting the Subjects tab:

There you can see the list of subjects that Déjà Vu X3 uses, showing their names and the subject code for reach. Find the subject you want to replace, and the subject you want to replace it with, and take note of their numbers.

The SQL commands

How to run SQL commands on a Termbase

To see how to use the SQL commands to make changes in a Termbase, read this article.

The SQL commands

Type and run the following statements, one at a time, into the Execute SQL dialog:

UPDATE Attributes SET TextValue = 'CodeOfTheSubjectYouChoose' WHERE TextValue = 'thecurrentcodeyouwanttooverwrite' AND AttrTypeID IN (SELECT ID FROM AttrTypes WHERE Token = 'subject');

Be aware that:

  • These statements will overwrite all the existing subjects from all the segments that have the subject you choose to overwrite.
  • The 'thecurrentcodeyouwanttooverwrite' should be the subject number of the subject you wish to replace.
  • The 'CodeOfTheSubjectYouChoose' should be the subject number of the subject you wish to replace it with.
  • The apostrophes (') have to be vertical; otherwise you may get a syntax error.
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk