The query definition has about 75 lines.     It is part of an Excel VBA routine in which I connect to a MS SQL database using ADO.  One reason to go with an external file is to avoid adding the line break characters such as  " & _  at the end of every line.
I am able to retrieve my file with VBA and pass it to string variable, no problem.   When I paste it in Microsoft SQL Studio, it will trigger errors.  My query definition  becomes 4 very long lines of 2000 characters and it will truncate anywhere like a middle of a word.
Also just a note to mention that when I retrieve the file, by code I replace a variable with an actual part number.   For example, 'SC1' can become '0270'
Obviously I am doing it wrong.   Can somebody guide me in the right direction or offer an example.  TIA.