:setvar Instance SUBSTRING(@@SERVERNAME,7,3)
:setvar FolderPath "\\Here\there\where"
I have two sqlcmd variables that i need to concatenate and store the values in the third variable and use that variable in a query.
:setvar FullName $(FolderPath)+$(FolderPath)
how can this be done, i tried a couple methods- don't seem to work- any idea?
No need to concatenate the sqlcmd scripting variables, just do the concatenation in the query.
:setvar PartOne 'first_'
:setvar PartTwo 'second'
select char(39) + $(PartOne) + $(PartTwo) + char(39) as full_path