﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2008 / SQL Server 2008 - General  / Variable String + Variable / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Thu, 23 May 2013 16:51:24 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Variable String + Variable</title><link>http://www.sqlservercentral.com/Forums/Topic1361043-391-1.aspx</link><description>[quote][b]samtwilliams (9/19/2012)[/b][hr]Can anyoen help with this.Thanks[/quote][code="sql"]DECLARE @variable varchar(100), @command VARCHAR(500)SET @variable = 'E:\MyData\Target\CSV'SET @command = N'Exec dbo.pReport_Update_Unit ''' + @variable + ''''SELECT @command[/code]</description><pubDate>Wed, 19 Sep 2012 02:08:19 GMT</pubDate><dc:creator>ChrisM@Work</dc:creator></item><item><title>RE: Variable String + Variable</title><link>http://www.sqlservercentral.com/Forums/Topic1361043-391-1.aspx</link><description>Can anyoen help with this.Thanks</description><pubDate>Wed, 19 Sep 2012 01:46:40 GMT</pubDate><dc:creator>samtwilliams</dc:creator></item><item><title>Variable String + Variable</title><link>http://www.sqlservercentral.com/Forums/Topic1361043-391-1.aspx</link><description>I am modifying a script that creates Jobs, is it possible to achieving the following;@command=N'Some Command' + @ANOTHER_VARIABLEI need to tag the contents of another variable to then end of one being set.Can anyone explain how i could achieve this, my real life example is [quote]@command=N'Exec dbo.pReport_Update_Unit ''E:\MyData\Target\CSV''',[/quote]I need the Path including single quotes to be passed in by a variable set further up the script, i expected my script to work or look something like below;e.g.[quote]DECLARE @variable varchar(100)SET @variable = ''E:\MyData\Target\CSV''@command=N'Exec dbo.pReport_Update_Unit '+@variable,[/quote]</description><pubDate>Tue, 18 Sep 2012 15:42:08 GMT</pubDate><dc:creator>samtwilliams</dc:creator></item></channel></rss>