Quantcast
Channel: Pentaho Community Forums - BI Platform
Viewing all articles
Browse latest Browse all 2893

sql?

$
0
0
Hello.

I am here again with my silly questions.

I am just wondering what SQL-query style is correct for Pentaho CE 5? I have been using MySQL-based queries and they have been working time for time for now ..
Until today I confronted a problem with my query. The query works on Toad for MySql and I get the result that I wanted. And then I copy-pasted that query to Pentaho SQL-query .. And all I can get is an error to my linechart.

Where is the problem?

I have been noticing that sometimes my queries have not quite been working just copy-pasting, for example had to change ' or " marks to ` ..

Hopefully somebody understood what I was asking.

Code:

select DATE_FORMAT(dt, '%e.%c.%Y %k:%i') as 'Thime',case id
when 1 then 'T1'
when 2 then 'T2'
when 3 then 'T3'
end as 'T_ID',
cast(temp as decimal(3,0)) as 'Value'
from
(
  SELECT dt, id, temp
  FROM data
  group by id, dt
  order by dt desc
  limit 30
) tmp
order by dt asc, T_ID asc

And if this is not working just because of my bad query, be nice and kick me softly :)!

Viewing all articles
Browse latest Browse all 2893

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>