Last active
April 23, 2021 21:13
-
-
Save DeflateAwning/675428fe9229696b3c920cb49a39970f to your computer and use it in GitHub Desktop.
PowerQuery custom step to generate a new column containing SQL Insert Statements for the entire table. Useful for loading Temp Tables.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
= Table.AddColumn(#"Changed Type", "SQL", each "INSERT INTO TableName (" & Text.Combine(Table.ColumnNames(#"Changed Type"), ", ") & ") VALUES (" & Text.Combine(List.Transform(Record.FieldValues(_), each "'" & Text.From(_) & "'") , ", ") & ")") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment