Hi Mahaboob, if you are mapping each device with it's respective Thing in the ThingWorx, you assume that Thing will have it's own properties. With that assumption you can simply create your SQL service under that Thing and assign the output of that service to the property of that Thing. Or otherwise you can also simply call that service directly onto the Mashup and display the data in a Grid or a Chart as per your requirement.
Thanks for your Quick Reply,
am giving in brief about my requirement,
- 1) Min and Max and actual value it has to fetch every row from database at certain interval (For example at first it has to fetch 33,45,55 from database and has to show in gauge widget, After 30 seconds If the min and max value is empty then use the same previous value only fetch the value 47 and show the updated, After 30 seconds if the min and max value in 3rd row is different then fetch 44,65,85 and show in the widget.
I think this should be achievable by
1. Writing SQL statement which will return all the required values, i.e. in this case Min, max and actual value; may be wrap that with a JS service to apply those additional logic of checking the values
2. You can now choose to put those values in an InfoTable or you could assign them individual properties of a Thing
3. Depending where you are storing those values in ThingWorx i.e. Infotable or Thing's properties you can simply use the OOTB service calls to get the property values and assign them individually to Gauge Widget.
4. Now to automate the part that the service executes every n number of secs you can use an Auto refresh widget calling that service periodically within the mashup.