Hi Guys;
When i am running the query to display Total Memory, Available Memory and Memory used then the values shown are numbers followed by E + 10. I know i need to do casting however what will the exact code for display.
I'm sorry, what does displaying it on your SolarWinds SAM Page have to do with how it displays in SWQL Studio? Those are two different things... SWQL Studio is just a useful tool for working with SWQL queries. I use it to create queries that I then copy and paste into Powershell scripts, Custom Tables, Custom Charts, and Custom Query resources. If you want to display this data on a view you can use some of the resources I just mentioned. Put a Custom Table (this would be your best bet since you'll need to play with the formatting of that number field) onto the view, configure the data source of the table to use a custom SWQL query, paste in your query from the SWQL Studio, then edit the table and the formatting to your liking. Should be pretty straightforward and simple. I do it all the time.
Having said all of that, the data you are querying doesn't need to be done via a custom SWQL query. You can easily just use a Custom Table, choose "Advanced", choose "Nodes" as the object type, and use the GUI. It would be much better to do it this way since you won't need to SELECT DetailsUrl and StatusIcon and ChildStatusIcon and VendorIcon to be able to make data clickable and have Status or Vendor Icons show up in your table. That data you are querying does not require a custom SWQL query in any way shape or form and doing it that way is creating more work for you than necessary. I only use custom SWQL queries when I am not able to get the data using the GUI. It is always better to use the GUI when possible. ALWAYS.
No one can resolve this problem ?
I don't think SWQL supports CAST. It has special functions like TOSTRING and stuff like that. I don't think there is a SWQL Function for what you are talking about (but I'm not sure). My question would be why you need to display it in the SWQL Studio? That type of conversion would be better suited for the presentation layer. For example, if you use that query in a Custom Table, you can then use the formatting features in the Edit Table section to display it the way you wish. Or, if right-click the results in SWQL Studio you can either Copy-Paste it into an Excel file, or Save Results As a CSV and format it in Excel to your hearts desire. That's the only solutions I would have for you.
Thank you for your reply. Actually I need to display this table on my Solarwinds SAM Page. So any advice how to do it beside SWQL studio ?