pavithra123
IS-IT--Management
Hi
I am using SQL server v 7.
when I execute the following
declare @cmd varchar (255)
declare @dt varcahr (30)
set @dt =getdate()
select @ cmd = 'isql -Q "select count(*) from <db>.dbo.<tablename>" -od:\zip\'+@dt'.txt'
exec master.dbo.xp_cmdshell @ cmd
I get the error
error at line 4
incorrect syntax '.txt'
I know that i am missing a string some where ( but where )
I did not want to put this in the forum ( looks silly ) after wasting considerable amount of time I am desparately asking for help.
Best regards
Prem.
I am using SQL server v 7.
when I execute the following
declare @cmd varchar (255)
declare @dt varcahr (30)
set @dt =getdate()
select @ cmd = 'isql -Q "select count(*) from <db>.dbo.<tablename>" -od:\zip\'+@dt'.txt'
exec master.dbo.xp_cmdshell @ cmd
I get the error
error at line 4
incorrect syntax '.txt'
I know that i am missing a string some where ( but where )
I did not want to put this in the forum ( looks silly ) after wasting considerable amount of time I am desparately asking for help.
Best regards
Prem.