I've got a method that uses sp_sproc_columns to find all parameters that need to be send for a stored procedure.
My question is how can I do something similar for inline SQL querys?
I want to get a list of the parameters the query is expecting.
Would the only way achieving this will be to use Regular expression? Any examples?
Example:
sql = "SELECT * FROM tbl WHERE id = @id AND name = @name"
I need to get a list that will contain @id and @name.