Thanks Sam!
I am trying to store the SQL in a "template" PT query that I have saved because it has so many parts (unions, pivot, etc.), so what I would have to do is use:
strSql1 = LEFT(qdf.SQL, x) 'where x is the number of characters
strSql2 = MID(qdf.SQL, y,z) ' where y is "x+1" and z is so many characters
strSql3 = Right(qdf.SQL, LEN(qdf.SQL) - y + z)
strSqlNEW = strSql1 & strSql2 & strSql3
I thought a "string" data type could take 2 billion characters. Was I mistaken? If it is only 255, then even the code (above) would not work when I concatenate the 3 parts. My SQL is about 3,000 characters.