![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I would really appreciate if anybody can correct me in the following query. In the following query, I am passing the database name and getting DataFileName in to the output variable, I would appreciate if any body can look into that and solve this problem. declare @dbFile varchar(100), @dbName varchar(100) set @dbName = 'myDb' execute sp_executesql N'select @dbFileName = SUBSTRING(FileName,1,len(FileName)) from '+@dbName+'.dbo.sysfiles where fileId = 1', N'@dbFileName varchar(100) output', @dbFile Thanks in advance. |
![]() |
| Thread Tools | |
| Display Modes | |
| |