Something that I’ve talked about before is the similarity and the annoyances in the SQL tables and field names using in Queries and Web Reports.
Way back in October last year I saw some similarities and I wanted to investigate them further.
It wasn’t until February this year that a posting on the MSSMS list prompted me to have a look at the SQL table side of things and I confirmed my suspicions. This is what I posted to the list:
Firstly, as I've suspected for sometime, but haven't got round to fully investigating it, there seems to be a strong correlation between the table names available for reports and the sections available for reports.
I've just visually identified something. Try changing all instances of SMS_R_ to v_R_ , SMS_G_ to v_GS_ and that should get you looking at/pointing to the right tables.
Then you're going to have to change some of the field names: Some of the text fields may just need an '0' at the end. Some of the others require a bit of lateral thinking - i.e. it's not SMS_R_System.LastLogonUserName but v_R_System.User_Name0 .
It seems that it’s a good few of us who are interested in this aspect of SMS. Only recently did another poster email the MSSMS list wanting to know how to convert an SMS Query into a SMS Web Report. I posted the above and her reply was as follows:
I've done what you suggest and it does work. You just have to change the table names to the correct names and the field names to the correct names, but it's a long, manual process to match the two up (query field name and report field name, that is...).
I believe all fields in one table in the query are also in one table in the report. For instance, if the SMS_R_System table has 17 fields, the corresponding v_R_System will have the same 17 fields, even if they are named a bit differently. I don't think I've run across anything yet where I found a field in SMS_R_System that was not in the corresponding v_R_System, but in v_R_Something_Else.
So there you go. Investigate everything in SMS, because you never know who else might be thinking along the same lines
.