Topic-icon Problem with sql sentence

More
07 Oct 2016 15:02 #3206

Hello,
Please share your backend & FTP login credentials via Contact us form, We'll look into it.


Thanks
Daniel

Please Log in or Create an account to join the conversation.

  • Denise Bru
  • Denise  Bru's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
07 Oct 2016 14:18 #3204

Ye, of course.

I'm making a new chart.
Data are in table but is imposible with options read correct data. Then I have to write sql sentence.

This. sql is running OK in mysql but no in vchart WHY??

SELECT (CASE WHEN p1_ret_realizados < 8 THEN 'Menos de 8 Retos' WHEN p1_ret_realizados >= 8 THEN '8 o más Retos' END) as tipo, count( p1_ret_realizados) as valor FROM hs_historico_datos where co_estadistica=1 and p1_ret_realizados != "" group by tipo order by tipo

VChart change case 1 "<8" for "=8" and delete case ">=9"

I need this sql but i you think that is posible do it using other way tell me. please.

Please Log in or Create an account to join the conversation.

More
07 Oct 2016 11:08 #3201

Hi,
couldn't understand what you actually mean. Can you please explain the problem you are having?


Thanks
Daniel

Please Log in or Create an account to join the conversation.

  • Denise Bru
  • Denise  Bru's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
07 Oct 2016 10:50 #3200

Pardon in sql sentence can not change NOT equal.

Look

SELECT (CASE WHEN p1_ret_realizados < 8 THEN 'Menos de 8 Retos' WHEN p1_ret_realizados >= 8 THEN '8 o más Retos' END) as tipo, count( p1_ret_realizados) as valor FROM hs_historico_datos where co_estadistica=1 and p1_ret_realizados != "" group by tipo order by tipo

The problem is <8 and >= 8

Please Log in or Create an account to join the conversation.

  • Zaheer Abbas
  • Zaheer Abbas's Avatar
  • Visitor
  • Visitor
02 Jul 2016 06:19 #2840

Hi Denise

You have to use not equal option in sql query writing section. I have explained in attach image.

Thanks
Zaheer

Attachments:

Please Log in or Create an account to join the conversation.

  • Denise Bru
  • Denise  Bru's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
01 Jul 2016 12:11 #2837

Hello I need tell to sql sentence this

where field <> ''

how can i do it??

Thanks

Please Log in or Create an account to join the conversation.

Cron Job Starts