SQL command for removing segments with empty target cells from TM/TB
Thread poster: Olaf Reibedanz

Olaf Reibedanz  Identity Verified
Colombia
Local time: 08:49
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  Identity Verified
Sweden
Local time: 15:49
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
Germany
Local time: 15:49
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  Identity Verified
Local time: 15:49
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  Identity Verified
Colombia
Local time: 08:49
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 tryingicon_smile.gif

 


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

Advanced search






BaccS – Business Accounting Software
Modern desktop project management for freelance translators

BaccS makes it easy for translators to manage their projects, schedule tasks, create invoices, and view highly customizable reports. User-friendly, ProZ.com integration, community-driven development – a few reasons BaccS is trusted by translators!

More info »
Wordfast Pro
Translation Memory Software for Any Platform

Exclusive discount for ProZ.com users! Save over 13% when purchasing Wordfast Pro through ProZ.com. Wordfast is the world's #1 provider of platform-independent Translation Memory software. Consistently ranked the most user-friendly and highest value

More info »



Forums
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search