We are using SQL and have a script file to generate the Database and tables. I am trying to write a generic script which will execute on all dev/prod machines The file name which i am giving is FILENAME = N'c:\Program Files\Microsoft SQL Server\MSSQL.3\MSSQL\DATA\DBname.mdf'
It works on my machine but not on all the dev machine since all have different path for SQL. Is there a way to make this setting as generic? I want to make this script to Run on all machine which has SQL server installed.