Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQL query problem

Author  Topic 

acema
Starting Member

1 Post

Posted - 2010-05-20 : 01:38:26
Hi all,

I'm plotting a graph using values from the database which i have stored inside.

Below is the sentence i use to extract my x & y axis values.

select temp,result_time from mts300_results where nodeid=5 order by result_time like '%:00:%' desc limit 10;

where temp = x axis
result_time = y axis

wanting the graph to plot a point every hour in the result time(yyyy-mm-dd hh-mm-ss)and where showing the lastest result.


But the graph output time and date is not desc and it all jumble up.
can any one help me to correct my statement?

Any help will be appreciated.

Thanks & Regards
Joseph

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2010-05-20 : 02:06:00
try posting your question at a MySQL forum. This is a SQL Server forum


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -