Assistance on having input parameters on following script

Copper Contributor


A consultant wrote the following script, which I took and put in a batch file, calling the script through sqlcmd.    I want to take the "hardcoded dates" in the script and change to allow the user to input the dates(they will vary from day to day).    Can someone assist me in the best way to handle this?


/****** Script for SelectTopNRows command from SSMS ******/
FROM [NXO].[dbo].[SMC01_DATA] where fdate > '11/15/2022' and fdate < '11/16/2022' order by FDATE asc



0 Replies