Hey @yoko2020 ,
Thanks for your reply. I have a new error which I consider as a step closer to the solution 😁.
My query was:
SELECT [Sheet1$].[Col1], [Sheet1$].[Col2], [Sheet1$].[Col3], [Sheet1$].[Col4], [Sheet2$].[Col1], [Sheet2$].[Col2], [Sheet2$].[Col3] FROM
[Sheet1$] LEFT JOIN [Sheet2$]
ON ( [Sheet1$].[Col4] = [Sheet2$].[Col3] AND [Sheet1$].[Col3] = [Sheet2$].[Col2] )
-- Brackets for ON clause
SELECT [Sheet1$].[Col1], [Sheet1$].[Col2], [Sheet1$].[Col3], [Sheet1$].[Col4], [Sheet2$].[Col1], [Sheet2$].[Col2], [Sheet2$].[Col3] FROM
[Sheet1$] LEFT JOIN [Sheet2$]
ON [Sheet1$].[Col4] = [Sheet2$].[Col3] AND [Sheet1$].[Col3] = [Sheet2$].[Col2]
--Without Brackets for ON Clause
SELECT * FROM [Sheet1$] LEFT JOIN [Sheet2$]
ON ( [Sheet1$].[Col4] = [Sheet2$].[Col3] AND [Sheet1$].[Col3] = [Sheet2$].[Col2] )
-- Select *
Now the error which I get is:
No value given for one or more required parameters.
Stack Trace as below:
Correlation Id: b27beb00-d575-4c08-8864-a4a26e58c98c
No value given for one or more required parameters.: Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.ActionException: Error in SQL statement No value given for one or more required parameters. ---> System.Data.OleDb.OleDbException: No value given for one or more required parameters.
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr)
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at Microsoft.Flow.RPA.Desktop.Modules.Database.Actions.DatabaseActions.ExecuteSQLStatement(Variant connectionString, Variant sqlConnectionVariable, Variant sqlCommand, Variant& result, Int32 timeout, Int32 getConnection)
--- End of inner exception stack trace ---
at Microsoft.Flow.RPA.Desktop.Modules.Database.Actions.ExecuteSqlStatement.Execute(ActionContext context)
at Microsoft.Flow.RPA.Desktop.Robin.Engine.Execution.ActionRunner.Run(IActionStatement statement, Dictionary`2 inputArguments, Dictionary`2 outputArguments)
Seems that one of the column Names of my sheet is a keyword in PAD. I have enclosed it in Brackets. Hope that is not the issue here.
Regards
Ghiridhar