Check your query length settings in SSMS. I think the default size for a query's text in SSMS is 1024 characters and your length looks very close to that.