Hello everyone, I'm trying to use the ntfs_acl_pe...
# windows
b
Hello everyone, I'm trying to use the ntfs_acl_permissions table with a wildcard in the path field but I'm not able to get any results. For example, the following query worked:
select * ntfs_acl_permissions where path = "C:\Users\vagrant\Documents\test.txt";
But when I tried to use wildcard, I cannot have results:
select * from ntfs_acl_permissions where path like "C:\Users\vagrant\Documents\%";
Do you know if it is possible to use wildcard with this table or am I making a mistake? Thanks for your help.
a
Probably not the issue, but have you tried single quotes? i.e.
SELECT * FROM ntfs_acl_permissions WHERE path LIKE 'C:\Users\vagrant\Documents\%'
s
Depending on how the table is implemented, you may need to use the file table to expand
path
and then join that to
ntfs_acl_permissions
b
Thanks for your help both. I finally use the join (file, ntfs_acl_permissions) like you said. Here is the final query:
SELECT f.path, p.*
FROM file AS f
CROSS JOIN ntfs_acl_permissions AS p
WHERE f.path LIKE 'C:\Users\vagrant\Documents\%'
AND p.path = f.path;