In order to access a table in SQL while the Table name is dynamic you should use stored procedure.
For example - first you need to create the stored procedure in the SQL data base. (You can do it using Microsoft management studio).
The below stored procedure will select the top 10 rows from the table.
CREATE PROCEDURE [dbo].[Dymanic_Query]
@tablename as varchar(50)
AS
BEGIN
DECLARE @query_a AS nvarchar(500)
SET @query_a = 'SELECT TOP 10 * FROM dbo.' + @tablename
EXECUTE sp_executesql @query_a
END
Then you need to call the stored procedure using query in UniLogic.
[dbo].[Dymanic_Query] :TableName