Page 1 of 1

Generating Report from SQL with WHERE function

Posted: Thu Jun 06, 2019 2:25 am
by Gargy
Hi!

I´m stuck with what should be a very simple task. I need to generate report from a specific Level in process. For instance - I have a process which is divided into 3 stages - Preheating (Tag = 10), Process (Tag = 15) and Cooling (Tag = 20).

I took the Sample_Report program and added additional tag (Stage). This tag is also included in DataLogger1 as LogItem6. The I took Database.xls, added in Last25 table the new tag (LogItem6) and so far so good. My query show the correct Value for the LogItem6 (10, 15 or 20). my next step was to only show the values, where LogItem6 equals 15. I added WHERE function:

SQL(General; select * from DataLogger1 WHERE LogItem6=15)

But when I press Generate Report, it says that Report can't be generated (however, no Error comes up when building the program).
Can someone point me where the issue can be? I'm guessing that WHERE function is wrongly formulated, but can't find it how...

Thank you!
Gargy

Re: Generating Report from SQL with WHERE function

Posted: Mon Jun 10, 2019 5:01 pm
by Russ C.
Try adding quotes around the 15, like
SQL(General; select * from DataLogger1 WHERE LogItem6 = '15')