SQL Statement:
INSERT INTO [dbo].[WebADI_File_Data]
([Id]
,[Power_Automate_Log_Id]
,[Upl]
,[Payment_Method]
,[Customer_Taxpayer_ID]
,[Legal_Entity]
,[Supplier_Number]
,[Payment_Terms]
,[Supplier_Site_Name]
,[PO_Number]
,[Quantity_Invoiced]
,[Invoice_Number]
,[Invoice_Comments]
,[Invoice_Description]
,[Invoice_Date]
,[Invoice_Total]
,[Line_Number]
,[Line_Description]
,[Line_Amount]
,[Tax_Code]
,[Project_Number]
,[Task_Number]
,[Expenditure_Type]
,[Expenditure_Item_Date]
,[GL_Account]
,[Expenditure_Organization]
,[Code_Of_Account]
,[Messages]
,[IsUploaded])
VALUES
(NEWID(),'F8CE65AF-1906-40C8-B0E4-AB7A9BD625B9','','','',80054,173661,'Pay When Paid','PO BOX 820','',%Quantity_Invoice[Index]%,%InvoiceNumber[Index]%,'','','',%Invoice_Total[Index]%,'',%LineDescription[Index]%,%Invoice_Total[Index]%,'No Tax',%Project_Number[Index]%,'','9232-Subcontract(Construction)','7/25/2023','','800544103800570901 USA - HOUSTON','','',0)
I tried putting this string value ' GIS Labour 3.5 Hrs INV10525169' directly in place of %LineDescription[Index]% and the same query worked
Column Data Type <Line_Description, nvarchar(100),>
Output of variable %LineDescription[Index]% -

Error:
Correlation Id: 02ce7dc2-d6db-490d-bcab-902863716ee3
Incorrect syntax near 'Labour'.: Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.ActionException: Error in SQL statement Incorrect syntax near 'Labour'. ---> System.Data.OleDb.OleDbException: Incorrect syntax near 'Labour'.
at System.Data.OleDb.OleDbDataReader.ProcessResults(OleDbHResult hr)
at System.Data.OleDb.OleDbDataReader.NextResult()
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)
Flow Detail:

