Hi,
I use table name as input parameter of SQL Query to select data from external table and try to execute query.
I got the error as below.
Errors message :
Invalid object name 'CoABT.dbo.CoCounter'.
My Query:
Select @EntityName.* From @EntityName
Input parameter (Expand Inline set to Yes) :
"{CoCountersABT}"
---------
I try with other Query
Query:
SELECT {CoCountersABT}.* from {CoCountersABT}
It work.
I checked the generated query in Executed SQL. It's the same both.
Executed SQL:
Select [CoABT].[dbo].[CoCounters].[Id], [CoABT].[dbo].[CoCounters].[ColumnName], [CoABT].[dbo].[CoCounters].[Counter], [CoABT].[dbo].[CoCounters].[Filler1] From [CoABT].[dbo].[CoCounters]
So can we use table name as input parameter to dynamic query??
Thanks,
Hung
Hi @Hung Nguyen
I think what you need it's in this thread: https://www.outsystems.com/forums/discussion/46809/dynamic-advanced-sql-table-name-as-a-parameter/
Regards
Gonçalo Almeida
Thanks @Goncalo Almeida . I tried but it doesn't work.
Error:
Invalid object name 'dbo.CoCounters'.