Thanks for the response!!
Yes, I have the query in the same format...But how can I link a dataset to the input parameter @p_name1 in my stored procedure.
Basically I was looking a format like
CREATE PROCEDURE MySchema.MyProcedure
@p_name1 Dataset ='select columnA from table', @p_name2 DataType[/]
AS
SELECT ColumnList FROM Table WHERE ColumnA = @p_name1 AND ColumnB = @p_name2
GO
@p_name1 should hold the result set of columA from a different table.
Thanks
Pradeep GS