Hi there
Here is what I would like to execute
SELECT * FROM sale WHERE id =1 AND caldate >='10/1/2015' AND caldate <='10/31/2015'
and I don't know how to write this in SP
CREATE PROCEDURE [dbo].[sale] @id int, @ftdate datetime, @ldate datetime AS BEGIN SELECT * FROM sale WHERE id = @id AND caldate >= "'" + @fdate + "'" + AND caldate <= "'" + @ldate + "'" END GO
Is this a correct way to enclose a variable in single quotes?
Thanks for your time.
Joe