This site uses cookies.
Some of these cookies are essential to the operation of the site,
while others help to improve your experience by providing insights into how the site is being used.
For more information, please see the ProZ.com privacy policy.
SQL command for removing segments with empty target cells from TM/TB
Thread poster: Olaf Reibedanz
Olaf Reibedanz 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
Subject:
Comment:
The contents of this post will automatically be included in the ticket generated. Please add any additional comments or explanation (optional)
Joakim Braun 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]
Subject:
Comment:
The contents of this post will automatically be included in the ticket generated. Please add any additional comments or explanation (optional)
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.
Subject:
Comment:
The contents of this post will automatically be included in the ticket generated. Please add any additional comments or explanation (optional)
Ilde Grimaldi 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.
Subject:
Comment:
The contents of this post will automatically be included in the ticket generated. Please add any additional comments or explanation (optional)
Olaf Reibedanz 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
Subject:
Comment:
The contents of this post will automatically be included in the ticket generated. Please add any additional comments or explanation (optional)
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.
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.