| Function |
SQL
Statement |
| Files with no keyword |
not exists (select idKeyword from ThumbnailKeyword
where ThumbnailKeyword.idThumb = tn.idThumb)
OR
tn.idthumb not in (select distinct idThumb from ThumbnailKeyword)
OR
not exists (select idthumb from thumbnailkeyword tk inner
join keyword kw on tk.idkeyword = kw.idkeyword where kw.keyword
= 'KEYWORD' and tk.idthumb = tn.idthumb) |
| Any files with keywords |
exists (select idKeyword from ThumbnailKeyword
where ThumbnailKeyword.idThumb = tn.idThumb) |
| Search between two dates |
tn.file_time < ^udate(2000/06/05)
and tn.file_time > ^udate(1999/01/02)
OR
tn.file_time >= ^udate(2001-03-01) and tn.file_time
<= ^udate(2002-04-15)
The SQL "between" operator also works, so:
tn.file_time between ^udate(2001-07-01) and ^udate(2001-07-31)
|
| All files thumbnailed since
date |
tn.thumbnail_time >= ^udate(2002/10/1) |
| All files modified or saved
since date |
tn.file_time >= ^udate(2002/10/1) |
Test for a range of dates
For example, to find all files thumbnailed in October
2002. |
tn.thumbnail_time >=
^udate(2002/10/1)
tn.thumbnail_time <= ^udate(2001/10/31) |
| Annotation |
tn.annotation like '%your info here%' |
| Thumbsnails with only one
specific keyword |
Select the keyword to look for in the
keyword search page of ThumbsPlus, select AND as the combination
method of the sub-dialog pages and put the following SQL
phrase
(select count(*) from thumbnailkeyword kw where kw.idThumb
= tn.idThumb) =1
in the advanced search dialog page. |
| Exact duplicate images
within T+ database |
tn.idthumb in (select distinct
a.idthumb from thumbnail as a, thumbnail as b where a.idthumb
<> b.idthumb and a.checksum = b.checksum) |
| Empty annotations field |
tn.annotation not like '%' |
| Annotations field has entry |
tn.annotation like '%' |
| Limit a search to a specific gallery |
tn.idThumb in (select ThumbnailGallery.idThumb from ThumbnailGallery inner join Gallery on ThumbnailGallery.idGallery=Gallery.idGallery where Gallery.name = 'Photos')
|
| All thumbnails not in a
gallery |
tn.idThumb not in (select
gt.idThumb from GalleryThumb gt) |
| Find all files in more than
one gallery |
(select count(*) from GalleryThumb
gt where gt.idThumb = tn.idThumb) > 1 |
| Search for file name by
path |
exists (select*from path where path.name
like '%testing%' and path.idPath = tn.idPath) |
| Keyword search |
tn.idthumb in (select distinct idthumb
from thumbnailkeyword tk where
tk.idkeyword = (select idkeyword from keyword where keyword
= 'Mom')) and
tn.idthumb not in (select distinct idthumb from thumbnailkeyword
tk where
tk.idkeyword = (select idkeyword from keyword where keyword
= 'Dad'))
More
Information |
| Probable dupes |
tn.idthumb in
(select distinct a.idthumb
from thumbnail as a, thumbnail
as b
where a.idthumb <>
b.idthumb
and a.name =
b.name
and a.filesize
= b.filesize |
| File names that include
unusual characters |
tn.name like '%[%]%.JPG'
or tn.name like '%[~]%.JPG'
or tn.name like '%[;]%.JPG'
or tn.name like '%[^]%.JPG'
or tn.name like '%[[]%.JPG'
or tn.name like '%[]]%.JPG' |
| All photos, excluding offline
volumes, not included in a particular gallery |
tn.idPath not in
(select p.idPath from Path p, Volume v
where tn.idPath=p.idPath
and v.idVol = p.idVol
and v.filesystem = 'CDFS')
or
tn.idPath not in
(select p.idPath from Path p, Volume v
where tn.idPath=p.idPath
and v.idVol = p.idVol
and v.filesystem = 'CDFS')
and tn.idThumb not in
(select gt.idThumb from GalleryThumb gt, Gallery g
where g.idGallery = gt.idGallery
and g.Name = 'The Name Of My Unwanted Gallery Goes Here') |
| To find all color images
(palette, rgb or cmyk) |
tn.[colortype] <>
1
Then, to sort with grayscale images first, the user could
create a new user field, say "gray" and set
it to "yes" or "Y" for all found gray
images. (Edit | Select All, then Thumbnail | Assign User
Field).
Then, show the user field, and sort by it. |