Number Format in data queries

Answered

Some numbers in my queries get changed from

to

This is pretty annoying since that number is a date encoded as an integer.  We use these a lot on my team. 

Is there any way to turn this off?  I looked through the SQL code style settings and didn't see anything.  (BTW, I'm using pycharm but this is a data/datagrip issue right?)

4 comments
Comment actions Permalink

What is your SQL dialect? Could you please share full query text? Does it happen when you press 'reformat code'?

0
Comment actions Permalink

This happens in both SQL Server and Azure SQL.  It seems like it only happens upon initially opening a view or proc -- I think it's breaking large numbers up to make them easier to read, right?  Another example below, where the integer 999999 is displayed as 999_999:

This is helpful for regular numbers, but as I pointed out in my OP it's a problem with dates that are encoded as integers so I'd like to be able to turn it off.

'reformat code' has no effect, but if I click on the number it changes to a normal int without any underscores, temporarily, but switches back to using underscores when I close then re-open the view/proc.

0
Comment actions Permalink

please go to  File | Settings | Editor | General | Code Folding -> SQL -> and disable 'put underscore in...' option.

0
Comment actions Permalink

That's it, thanks!  (I had looked for a setting in the SQL Code Style area)

0

Please sign in to leave a comment.