I have a 200 line long stored procedure, which gets a parameter 'prmtr',
What I want to do is add an "sql part" to my stored procedure, according to my parameter.
example:
SELECT A.* FROM
(
SELECT * FROM table1
) A
IF (my parameter) = a
LEFT JOIN
(
SELECT * FROM table2
) B
ON A.ID= B.ID