Which date function should I use to get this level of information?
I tried to use DATECVT function but I get an error.
Please help.This message has been edited. Last edited by: FP Mod Chuck,
WebFOCUS 8 Windows, All Outputs
June 13, 2019, 11:13 AM
BabakNYC
If you can edit the synonym remove the s from HMDYYs for both USAGE and ACTUAL.
If you aren't allowed to modify the synonym, then create a DEFINE INSERT_DATE/HMDYY=INSERT_DATE;
WebFOCUS 8206, Unix, Windows
June 13, 2019, 11:33 AM
Gagan Marwah
That was my first thought and this works but all it does is drops minutes seconds and milliseconds. I would also like for it to sum the count values by Date and Hour
SUM INSERTCOUNT UPDATECOUNT DELETECOUNT BY DateHour AS 'Date' WHERE STOREDPROCEDURE EQ 'usp_Balance_T_Tables' OR 'usp_Balance_H_Tables' OR 'usp_Balance_B_Tables'; WHERE Last_Updated_Day_Diff LE 7;
WebFOCUS 8 Windows, All Outputs
June 13, 2019, 03:21 PM
MartinY
Please use the code tag when posting sample code/data Last icon on the ribbon that look like:
</>
Also share the entire valid code because now, what you've shared is not valid FOCUS code
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
June 13, 2019, 03:34 PM
Gagan Marwah
ENGINE INT CACHE SET ON
-*COMPONENT=Define_tb_operation_log
DEFINE FILE servicemanagement/tb_operation_log
DateHour/HMDYYH=TB_OPERATION_LOG.TB_OPERATION_LOG.DTTM ;
END
-DEFAULTH &WF_SUMMARY='Summary';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
TABLE FILE servicemanagement/tb_operation_log
SUM SUM.TB_OPERATION_LOG.TB_OPERATION_LOG.INSERTCOUNT
SUM.TB_OPERATION_LOG.TB_OPERATION_LOG.UPDATECOUNT
SUM.TB_OPERATION_LOG.TB_OPERATION_LOG.DELETECOUNT
BY DateHour
WHERE TB_OPERATION_LOG.TB_OPERATION_LOG.STOREDPROCEDURE EQ 'usp_Balance_T_Tables' OR 'usp_Balance_H_Tables' OR 'usp_Balance_B_Tables';
ON TABLE PCHOLD FORMAT HTML
ON TABLE NOTOTAL
ON TABLE SET CACHELINES 100
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET SQUEEZE ON
ON TABLE SET HTMLCSS ON
ON TABLE SET HTMLENCODE ON
ON TABLE SET EMPTYREPORT ON
ON TABLE SET GRWIDTH 1
ON TABLE SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, SUMMARY=&WF_SUMMARY.QUOTEDSTRING, HFREEZE=OFF, $
ENDSTYLE
END
-RUN
WebFOCUS 8 Windows, All Outputs
June 13, 2019, 03:42 PM
BabakNYC
I'm not sure if I understand why you have SUM SUM.INSERTCOUNT.
What happens if you change your code to SUM CNT.INSERTCOUNT?
WebFOCUS 8206, Unix, Windows
June 20, 2019, 02:00 PM
Hallway
quote:
Originally posted by BabakNYC: I just tested this on my machine and it returns one row per hour.
Dang, that is a REALLY SLOW retrieval rate. Might want to optimize that adapter...