SQL command for removing segments with empty target cells from TM/TB
Thread poster: Olaf Reibedanz
Olaf Reibedanz
Olaf Reibedanz  Identity Verified
Colombia
Local time: 02:40
Member (2003)
English to German
+ ...
Jul 10, 2013

Hi everybody,

I am in the process of editing/cleaning my databases (Translation Memories and Term Bases) and I need to get rid of all segments where the target cell is empty. (I think this has happened because I made a mistake when exporting/importing segments between databases).

Does anybody know an SQL command for removing all those segments from my database in one go?

Many thanks in advance!

Kind regards,

Olaf


 
Joakim Braun
Joakim Braun  Identity Verified
Sweden
Local time: 09:40
German to Swedish
+ ...
Perhaps Jul 10, 2013

I know nothing of your database structure, but if you're looking for a NULL column, it should be:

DELETE FROM ... table name ... WHERE ... column name ... IS NULL;

[Bearbeitet am 2013-07-10 17:42 GMT]


 
NatM
NatM
Germany
Local time: 09:40
English to German
+ ...
SQL command Jul 11, 2013

Enter this SQL command in your database:

ID IN (SELECT ID FROM Sentences GROUP BY ID HAVING Count(ID) = 1)

Then, only segments with empty targets will be displayed.
You can then mark and delete them.


 
Ilde Grimaldi
Ilde Grimaldi  Identity Verified
Local time: 09:40
Member (2003)
English to Italian
+ ...
thank you Sep 5, 2013

Hi. It wasn't me asking at that time, anyway thank you for posting the answer, it was very useful with a TM of mine. I see I lost two thousand targets for some reason.

 
Olaf Reibedanz
Olaf Reibedanz  Identity Verified
Colombia
Local time: 02:40
Member (2003)
English to German
+ ...
TOPIC STARTER
Thanks everybody! Sep 9, 2013

Unfortunately the suggested SQL commands didn't work. I have probably overlooked something obvious... I will keep trying

 


To report site rules violations or get help, contact a site moderator:

Moderator(s) of this forum
Pavel Tsvetkov[Call to this topic]

You can also contact site staff by submitting a support request »

SQL command for removing segments with empty target cells from TM/TB






Protemos translation business management system
Create your account in minutes, and start working! 3-month trial for agencies, and free for freelancers!

The system lets you keep client/vendor database, with contacts and rates, manage projects and assign jobs to vendors, issue invoices, track payments, store and manage project files, generate business reports on turnover profit per client/manager etc.

More info »
TM-Town
Manage your TMs and Terms ... and boost your translation business

Are you ready for something fresh in the industry? TM-Town is a unique new site for you -- the freelance translator -- to store, manage and share translation memories (TMs) and glossaries...and potentially meet new clients on the basis of your prior work.

More info »