Link to home
Start Free TrialLog in
Avatar of Trysten
TrystenFlag for United States of America

asked on

How lookup a value for TSQL Query.

I am building a query in MSAccess 2013. I have a Table containing the names of documents, and a different Table containing the path these Documents reside in. I would like a query that concatenates the path with the name of the document. Perhaps something like
SELECT Documents.ID, (SELECT Val FROM Local_Config WHERE Key = 'Repo') & Documents.Name From Documents;

Open in new window

I think this is a basic SQL question that I just don't have the knowledge to answer.
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

does the table " Local_Config" have a field corresponding to the Documents.ID field?

SELECT Documents.ID, (SELECT Val FROM Local_Config WHERE Key = 'Repo' and Documents.ID=Local_Config.ID) & Documents.[Name] From Documents;
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Make sure the path includes "\" at the end.  If it doesn't, you need to include one when you concatenate the path with the file name.
Avatar of Trysten