Avatar of Trysten
Trysten
Flag 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.
Microsoft AccessDatabases

Avatar of undefined
Last Comment
Trysten

8/22/2022 - Mon
Rey Obrero (Capricorn1)

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;
ASKER CERTIFIED SOLUTION
Ryan Chong

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
PatHartman

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.
Trysten

ASKER
Thanks!
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes