Hello everyone,
I am reaching out to all of you if hope to get help. I have a table that contains CompnyID, ParentCompanyName. I built a query using this table as a source which takes ParentCompanyName and manipulate the data to generate UniqueParentCompanyIDs and then I wanted to update add this column "Parent Company ID" to my existing table by using an update query. The obstacle that I came across with is that I was unable to do both steps in the same query. Is this something that can be done in one query? If yes, can you please help me to figure this out?
SQL for my query that manipulates the data to get Parent Company ID as follows:
SELECT ListOfParentCompanies.CompanyID, ListOfParentCompanies.[Parent Company Name], Trim(Left([Parent Company Name],8)) & "" & "101" AS [Parent Company ID]
FROM ListOfParentCompanies
ORDER BY ListOfParentCompanies.CompanyID;
Thanks for your help.