Since we started running our project i have found a small minor problem with some of the SQL coding. I know how I want to fix it, I just dont know the proper commands to do. Thought I would post it here for help.
Currently I have the following type of query:
SELECT count(*) FROM progmode1 WHERE shift =1 and fault1 =1 and mach_sel = 1
The problem is that it will count the previous days information as well. SO I though why not tell it that to check the date as well. I had thought about using the t_stamp field but each time I have tried to put it into the query after the WHERE statement I get either “You can not put that type of transact after a where statement” or “Syntax error”
Here are some of the items I had tried:
rtrim(left(t_stamp,10)) = {root container.current} (the root container.current has the simple query of get current time stamp and used the date format command.)
I also tried putting the rtrim command in its own root container item, but could not get the where clause to work correctly.
The SQL instance that it is looking at is quite large, it contains all the days run time event logs. All I want to do is narrow down the parameters of the query so it will only tally for the current day.
Thanks and have a great day.