Question for SQL gurus: separating codes from remaining text
Thread poster: Olaf Reibedanz
Olaf Reibedanz
Olaf Reibedanz  Identity Verified
Colombia
Local time: 03:34
Member (2003)
English to German
+ ...
Mar 31, 2008

Dear colleagues,

Does anybody know an SQL command that allows me to separate all the codes that are located either at the very begining or at the very end of segments from the rest of their segments? Here is an example of what the segments look like before executing that SQL command:

SEGMENT 1: {3310}Except as provided in subclauses {3311} and clause {3312} below, no Shareholder shall be entitled to transfer or otherwise dispose of its Shares without first offering them
... See more
Dear colleagues,

Does anybody know an SQL command that allows me to separate all the codes that are located either at the very begining or at the very end of segments from the rest of their segments? Here is an example of what the segments look like before executing that SQL command:

SEGMENT 1: {3310}Except as provided in subclauses {3311} and clause {3312} below, no Shareholder shall be entitled to transfer or otherwise dispose of its Shares without first offering them for transfer to the other Shareholders.{3949}{3313}
SEGMENT 2: {3307}The restrictions on transfer contained in this clause shall apply to all transfers operating by law or otherwise{3308} but only until all P Shares have been either converted or redeemed, after which the restrictions set out in this clause do no longer apply{3309}.{3310}


This is what this section should look like after executing the SQL command:

SEGMENT 1: {3310}
SEGMENT 2: Except as provided in subclauses {3311} and clause {3312} below, no Shareholder shall be entitled to transfer or otherwise dispose of its Shares without first offering them for transfer to the other Shareholders.
SEGMENT 3: {3949}{3313}
SEGMENT 4: {3307}
SEGMENT 5: The restrictions on transfer contained in this clause shall apply to all transfers operating by law or otherwise{3308} but only until all P Shares have been either converted or redeemed, after which the restrictions set out in this clause do no longer apply{3309}.
SEGMENT 6: {3310}


So there should now be six segments where before there were only two. I would like to know an SQL command that will do this automatically for me in the entire project.

Thanks a lot for your help!

Best,

Olaf
Collapse


 
Endre Both
Endre Both  Identity Verified
Germany
Local time: 10:34
English to German
Not possible Apr 1, 2008

Hello Olaf,

As far as I am familiar with SQL and the structure of a DVX project, segment splitting (or joining) is not possibly via a single SQL command (and is rather complex, if possible at all, via several SQL commands), because you have to assign new segment IDs, which is not a trivial matter (and there might be other complications I'm overlooking right now).

I have a manual solution (as an Autohotkey macro) for doing that from within DVX in
... See more
Hello Olaf,

As far as I am familiar with SQL and the structure of a DVX project, segment splitting (or joining) is not possibly via a single SQL command (and is rather complex, if possible at all, via several SQL commands), because you have to assign new segment IDs, which is not a trivial matter (and there might be other complications I'm overlooking right now).

I have a manual solution (as an Autohotkey macro) for doing that from within DVX in a single segment. You press a keyboard shortcut, and leading and trailing codes (and some other usually superfluous characters such as asterisks) are separated into new segments. But you have to do this with every single segment.

I can send you the macro (I might even be able to compile it to a small executable file) in a few hours if you want to give it a try.

Kind regards,
Endre
Collapse


 
Olaf Reibedanz
Olaf Reibedanz  Identity Verified
Colombia
Local time: 03:34
Member (2003)
English to German
+ ...
TOPIC STARTER
Hi Endre! Apr 1, 2008

Yes, that would be great! Thanks a lot

 
David Turner
David Turner  Identity Verified
Local time: 10:34
French to English
+ ...
Cleanup some codes by pre-processing? Apr 4, 2008

If such codes come from Word files, you might be able to get rid of some of them by pre-processing with the cleanup macro and the hide auto para numbers and bullets macro available either on the Atril Community site or in the files section of the yahoo dejavu list.

David Turner


 


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 »

Question for SQL gurus: separating codes from remaining text






Trados Business Manager Lite
Create customer quotes and invoices from within Trados Studio

Trados Business Manager Lite helps to simplify and speed up some of the daily tasks, such as invoicing and reporting, associated with running your freelance translation business.

More info »
Anycount & Translation Office 3000
Translation Office 3000

Translation Office 3000 is an advanced accounting tool for freelance translators and small agencies. TO3000 easily and seamlessly integrates with the business life of professional freelance translators.

More info »