Need Help to build SQL to show only files from determined folder in Project
Thread poster: mikhailo

mikhailo
Local time: 00:44
English to Russian
+ ...
Feb 24, 2017

Have been trying to build SQL expression to filter only segments from files in determined folder in project and NO SUCCESS

Example
there is a project

folder files
1
aaa.docx
bbb.docx
2
ddd.dslxliff
ccc.sdlxliff
rbm.tmx


I need to see only segments from files in folder «2». And I don't know how to do that. I tried to use short filenames (w/o path) with «FileID» without any success.
Examples in manual give no idea for solving this problem. Short Internet search was also unsuccessfull.

Anybody (but mainly Selcuk Akyuz as i can see) give the idea how to solve this problem and filter files in project

1. By name
2. By extension
3. By folder


 

Selcuk Akyuz  Identity Verified
Turkey
Local time: 00:44
Member (2006)
English to Turkish
+ ...
FileSpec Feb 24, 2017

Unfortunately I don't know how to do it but folder names are stored in the Files table, FileSpec column.

I have tried with ID IN but that failed.

ID IN (SELECT ID FROM Pairs WHERE ID IN (Select ID FROM Files WHERE FileSpec IN ((Select FileSpec FROM Files WHERE (((Files.FileSpec LIKE) "*xxxx*"))))))

Selcuk


 

Endre Both  Identity Verified
Germany
Local time: 23:44
Member (2002)
English to German
FileSpec is full path, FileExt is extension and FileName is file name Feb 24, 2017

Try this for a folder:
FileID in (
    SELECT ID FROM Files WHERE (FileSpec LIKE '*/YourSubfolder/*')
)

And this for an extension:
FileID in (
    SELECT ID FROM Files WHERE (FileExt LIKE 'yourExt')
)

And this for part of a filename:
FileID in (
    SELECT ID FROM Files WHERE (FileName LIKE '*partOfName*')
)


 

mikhailo
Local time: 00:44
English to Russian
+ ...
TOPIC STARTER
re Feb 24, 2017

Endre Both wrote:

Try this for a folder:
FileID in (
    SELECT ID FROM Files WHERE (FileSpec LIKE '*/YourSubfolder/*')
)

And this for an extension:
FileID in (
    SELECT ID FROM Files WHERE (FileExt LIKE 'yourExt')
)

And this for part of a filename:
FileID in (
    SELECT ID FROM Files WHERE (FileName LIKE '*partOfName*')
)


Thanks Endre. It works.


 


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 »

Need Help to build SQL to show only files from determined folder in Project

Advanced search






CafeTran Espresso
You've never met a CAT tool this clever!

Translate faster & easier, using a sophisticated CAT tool built by a translator / developer. Accept jobs from clients who use SDL Trados, MemoQ, Wordfast & major CAT tools. Download and start using CafeTran Espresso -- for free

More info »
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 »



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