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

mikhailo
Local time: 09:13
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: 09:13
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: 07:13
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: 09:13
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






SDL Trados Studio 2019 Freelance
The leading translation software used by over 250,000 translators.

SDL Trados Studio 2019 has evolved to bring translators a brand new experience. Designed with user experience at its core, Studio 2019 transforms how new users get up and running, helps experienced users make the most of the powerful features, ensures new

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 »



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