2 ms·
Regarding "Comment your code!": At least for MSSQL, it’s often recommended not to use -- for comments but instead /**/, because many features like the query sto
by Semaphor 2y ago
Regarding "Comment your code!": At least for MSSQL, it’s often recommended not to use -- for comments but instead /**/, because many features like the query store save queries without line breaks, so if you get the query from there, you need to manually fix everything instead of simply using your IDEs formatter.
- regexman1 2y agoI didn't realise that, great to know. Thanks!
- petters 2y agoThat sounds like a bug in the query store
- password4321 2y agoAre you able to cast as XML? I use that for OBJECT_DEFINITION, eg. select name,cast((select OBJECT_DEFINITION(object_id) for xml path('')) as xml) from sys.procedures This can be easier to straighten out since it preserves the newlines though other XML characters get mangled like > to >. One other option is VARBINARY plus something to un-hex it.