Access 2002:
I need to query a database with criteria that selects rows from a single table where the value in a computed field is contained in the value of a different field in the row.
--------------
Example of values: table1.path = h:\users\dand\my docs
LoggedInUser = dand
Using these values, I would want to select all rows where the field table1.path contained "dand".
--------------
Something like the following statement but I can't get the wildcards to work.
SELECT table1.path, Environ("username" AS LoggedInUser
FROM table1
WHERE (((table1.path) Like *[LoggedInUser]*))
ORDER BY table1.path;
Appreciate any help. Thanks
I need to query a database with criteria that selects rows from a single table where the value in a computed field is contained in the value of a different field in the row.
--------------
Example of values: table1.path = h:\users\dand\my docs
LoggedInUser = dand
Using these values, I would want to select all rows where the field table1.path contained "dand".
--------------
Something like the following statement but I can't get the wildcards to work.
SELECT table1.path, Environ("username" AS LoggedInUser
FROM table1
WHERE (((table1.path) Like *[LoggedInUser]*))
ORDER BY table1.path;
Appreciate any help. Thanks