Skip to main content

Posts

Showing posts from July, 2012

sql to email send

------------first time only --EXEC sp_configure 'show advanced options', 1;    --GO    --RECONFIGURE;    --GO    --EXEC sp_configure 'Ad Hoc Distributed Queries', 1;    --GO    --RECONFIGURE;    --GO    --EXEC sp_configure 'Web Assistant Procedures', 1;    --GO    --RECONFIGURE;    --GO  DECLARE @FinalQuery AS nVARCHAR(max)    set @FinalQuery = 'select * from branch' DECLARE @HEAD AS nVARCHAR(max)    SET @HEAD ='Branch Report '' <br/> visahlasl'    EXEC sp_makewebtask      @outputfile = 'd:\work_mandays.doc',      @query = @FinalQuery,      @colheaders =1,      @FixedFont=0,@lastupdated=0,     @resultstitle=@HEAD        ...