I got it! I was using pass-through logic already, so I looked further into the code to see if there was something I missed. Turns out there was. The issue ended up being some commenting that I had in SQL using the "--" syntax. Since it seems SAS was processing the SQL statement as a block of text (instead of the line-by-line formatting I had), it was including some additional lines in the comment that I was not expecting. I took those parts out, and now it works just fine. Thank you Doc, Mark, and SASKiwi for helping me to get to the bottom of this!
... View more