say you have an input ( database connection) and due to bad connection string it does not open and gives you error message saying ..Server error, connection error or whatever it is . However , all you need is the underlying SQL . Just change the file format to say EXCEL , then it will open up the QUERY box
If you open the workflow in Notepad, you can see the underlying XML for the workflow (Right-click on the file -> Open With -> Notepad). From here, if you navigate to that Tool, which is searchable by it's Tool ID, you should be able to see the query statement associated with it.