I took your advice and kept it as an expanded string. I also used nested derived tables to create pseudo-variables to avoid code repetition.Select Top 1000000 tblAssets.AssetID, tblAssets.AssetName, ThirdPeriodQuery.softwareName, ThirdPeriodQuery...
I needed to do this so here's what I came up with. I'm quite proud of this SQL statement so had to share. Since we can't use variables the charindex functions have to be repeated a gazillion times. Caution: It really bogs down the report editor.Se...