I know to include a :setvar command for a string in double quotes but what's the size limit there? Also can it do multiple line strings?
:SETVAR myWebsiteURL "https://something.somewhere.net"
:SETVAR myLongString "This is a long string that goes longer than this box but I am not sure if it will still work in a case like this one where I just keep typing willynilly"
I still don't know the definitive answer to my questions but I have done some testing in SQL Server 2016 SP2 and found that the string length works at least up to 11160 characters which is enough for my purposes. I'm not sure how to do it multiline but sql server management studio query windows allow at least 11160 characters on a line.
Here's what I used to test (note that you need the single quotes to make it a valid string and that you have to escape double quotes with another double quote):
:SETVAR myLongString "'This is a long string that goes longer than this box but I am not sure if it will still work in a case like this one where I just keep typing willynilly'"
select $(myLongString)
select len($(myLongString))