Forum Discussion
MarioCadena
Jan 06, 2021Copper Contributor
Insert new columns to SQL query data table in Excel
Hi All, I have created a table in excel using a SQL query. Also, I have inserted a column in the table that needs to be populated manually. The problem is when the query is updated; the adde...
SergeiBaklan
Jan 06, 2021Diamond Contributor
Depends on which technique you use for SQL query. If that's Power Query SQL connector, the workaround is return Power Query result as table first time, add manual column to it, Power Query this table again, merge with source on unique ID and return this result instead of initial one. All shall be done within same query, not as separate ones.
- MarioCadenaJan 06, 2021Copper Contributor
Thank you SergeiBaklan, unfortunately, I don't have the skills to do what you suggest. Do you have any documentation I can use as a guide?
Regards,
- SergeiBaklanJan 07, 2021Diamond Contributor
Please check this blog Self Referencing Tables in Power Query - Excelerator BI