Dynamically passing Table name as parameter in Stored Procedure in U-SQL
Open
- Dominant language
- C#
- Stars
- 231
- Forks
- 666
- PR merge metrics
- No merged PRs in 30d
Description
I want to pass the Table name as in-parameter in a stored procedure in U-SQL and then want to have a SELECT * FROM the table. Something like below ::
USE DATABASE ADLDEMO;
CREATE PROCEDURE IF NOT EXISTS sp_demo
(@TargetTableName string)
AS
BEGIN;
@a=
SELECT * FROM @TargetTableName;
OUTPUT @a
TO "/ADL-Demo/viewmultiple.csv"
USING Outputters.Csv(outputHeader:true);
END;
but this is giving me error like **"Rowset variable @TargetTableName was not found in the procedure 'sp_demo'."**
can anyone please help on how to do select * from a table passed as in-parameter?
Contributor guide
Assessment
This issue has not been assessed yet.