March 2004 Blog Posts
Why is it that you can pass a built string to xp_cmdshell but you can't build your string at the same time. What I mean is this:
This is legal:
DECLARE @cmd VARCHAR(255)DECLARE @ServerName SYSNAME
SET @ServerName = 'Server1'SET @cmd = 'copy C:\temp\test.txt \\ + @ServerName + '\SomeShare\'
EXEC master.dbo.xp_cmdshell @cmd
This is not legal:
DECLARE @ServerName SYSNAME
SET @ServerName = 'Server1'
EXEC master.dbo.xp_cmdshell 'copy C:\temp\test.txt \\ + @ServerName + '\SomeShare\'
Server: Msg 170, Level 15, State 1, Line 5Line 5: Incorrect syntax near '+'.Any comments?
TechNet Webcast: Authoring Reports in SQL Server 2000 Reporting Services – Level 200
April 1, 2004
10:00 AM - 11:30 AM Pacific Time
Jason Carlson, Product Unit Manager SQL Server, Microsoft Corporation, Doug Harts, Cizer Software
SQL Server 2000 Reporting Services further extends the business intelligence capabilities of SQL Server by providing great new capabilities for getting information out of data stored in many disparate locations. This webcast will focus on the report authoring requirements and how both Microsoft and partners provide the tools to get the most out of Reporting Services. Join Jason Carlson,...
Duane Dicks has a script that can display an analog clock in Query Analyzer.
Make sure your results are in text and your font is Courier.