[BUG-14509] Reporting Data Query: Column names with leading numbers drop the numbers

Hey folks,

Ignition 7.9.10

I’ve not done a ton of reporting, so I’m not sure if this is a bug or working as intended, but it has caused significant frustration for me this morning.

I’m currently trying to run a query that works just fine outside of the reporting environment, and find that columns that start with (or are entirely numeric) have any leading numeric characters dropped.

Here’s the Query:

Select
MAX(DateName(Month, T_Stamp)) [Month],
[2017] = round(sum(case when datepart(year,t_stamp) = '2017' then TotalDaily 
    else 0 end),0, 1),
[20Seven17] = round(sum(case when datepart(year,t_stamp) = '2018' then TotalDaily 
    else 0 end),0, 1),
[Twenty17] = round(sum(case when datepart(year,t_stamp) = '2019' then TotalDaily 
    else 0 end),0, 1)
from totaldaily
WHERE tag = 'meter'
group by DatePart(Month, T_Stamp)
Order By Case When month(t_stamp) <= month(GetDate()) Then month(t_stamp) +12
    ELSE month(t_stamp) END

And here’s a quick screenshot of the resulting data:

Report_Columns

You can see that the entirely numeric column name was dropped entirely.
I can escape this issue by adding a leading alpha or space (punctuation does not work).
Thoughts on what’s going on here?

Cheers,
Andrew

I’m not sure why it’s doing it, but I was able to replicate it. I’ll make a ticket – if there’s a technical reason why this needs to be this way we’ll update the docs, otherwise we’ll fix it. Thanks for catching this!