Important:
It is not possible to undo an SQL command. Back up your file before
running your command or run a similar SQL Statement filter to
check results and then execute the command.
After deleting or modifying records, repair/compact your
database.
Working
with SQL
DVX
works based on databases, so it is possible to execute SQL commands
to update, modify, or filter your database (memory, terminology,
or project database).
There
is no UNDO, so be very careful when using this tool.
To
execute an SQL command, go to Project > Execute SQL.
To
filter your database click on Row Selector and select SQL Statement.
It is the last option.
BTW,
it does not matter if you use single or double quotes in
your statements.
DVX
uses the operator OR to combine different status. That
is, if a sentence is Exact (1) and Locked (512),
its status is 513. To calculate a combined status, use Windows
Calculator in its Scientific view (there is an OR operator)
Match
Type +(or) Row Status will give you the basic Row Status
*
Populated - Using Polpulate Current Language. When populating
only one or a group of sentences using F5 does not change cells
status.
UPDATE Pairs SET Status_#### = Status_#### 2 + 4096 WHERE
((Status_#### \ 2) MOD 2) = 1 AND ((Status_#### \ 512) MOD 2)
<> 1
Where #### is your language code.
Alternatively
How to change row status without
SQL? Duncan Bell
This is just a tip in case you need to change row status values,
or
anything else global, in a project's segments, and can't do it
with SQL
(in my case because I haven't learnt it :).
Simply export the project to Word/RTF in an External View, including
the
row status info and, (essential, this!), segment IDs.
Then, find the row status values you
want to change and search and
replace them with the required values. You can delete them by
replacing
them with "nothing" in the Replace text box (where "nothing" really
is
nothing at all, i.e. you don't type anything).
The safest way to do this, especially
in a document that might contain
values that match a row status value, is to select the Status
column in
Word. When it is highlighted, the Word Search and Replace dialog
says "Search Down", and only replaces the texts selected
in that column.
Or you could replace one at a time, clicking OK when you are
prompted to.
If you're not sure of the value of your existing row status,
but need to
know that, to change it, change the first segment of the project
to that
new row status, in DVX, before the export to External View. Then
you
will see the row status value number in the Status column cell
for that
segment, in Word.
To find out what value to change your existing row status value
to,
change the second segment of the project to that new row status,
in DVX,
before the export to External View. Then you will see the row
status
value number in the Status column cell for that segment, in Word.
At the end, save your document, and
reimport it into Word in the usual
way to update your project.
DVX allows you to build your TDB using different templates. It
seems that the AttrTypeID (used in the commands below) varies according
to the choosen template. To see the IDs of your TDB, open
your TDB (file extension .dvtdb) in MS-Access, then open the table
AttrTypes. In my case, this is what I have:
ID 5 is subject; ID 6 is client; IDs 8 and 9 are customized fields;
etc.