Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

add to Crystal Command accessing HP Openview:ignore records for 3 min.

Status
Not open for further replies.

aubie1

Programmer
Jun 30, 2006
9
US
I am reporting off of HP Openview data source and am trying to add a condition to the WHERE clause so I can bring in those trap_name='niuSerialLinkBlockCleared'. after I do that, my ultimate goal is to ignore all records for the next 3 minutes after one of these trap_name='niuSerial....' no matter if they are present or not. i have tried to add this condition a few different ways and always get an error, most common is:

Failed to open a rowset.
Details: HY000:SOLID Table Error 13087:Function SUBSTRING: illegal value in parameter 3.

command in Crystal:
SELECT NNM_EVENT_DETAIL.NODENAME, NNM_EVENT_DETAIL.MESSAGE, NNM_EVENT_DETAIL.IP_ADDRESS, NNM_EVENT_DETAIL.TRAP_NAME,NNM_EVENT_DETAIL.EVENT_TIMESTAMP, NNM_EVENT_DETAIL.EVENT_TIME,

locate('Device unison', NNM_EVENT_DETAIL.MESSAGE),
locate(' on ', NNM_EVENT_DETAIL.MESSAGE),
substring (NNM_EVENT_DETAIL.MESSAGE,locate('Device unison',NNM_EVENT_DETAIL.MESSAGE)+13,locate(' on ',NNM_EVENT_DETAIL.MESSAGE) - locate('Device unison', NNM_EVENT_DETAIL.MESSAGE) - 13 ) as DEVICE,

substring (NNM_EVENT_DETAIL.MESSAGE,locate('NIU',NNM_EVENT_DETAIL.MESSAGE)+9,locate('----',NNM_EVENT_DETAIL.MESSAGE) - locate('NIU', NNM_EVENT_DETAIL.MESSAGE) - 9 ) as LOCATION

FROM NNM_EVENT_DETAIL
WHERE (TIMESTAMPDIFF(4,{?DATE FROM},NNM_EVENT_DETAIL.EVENT_TIME)>=0
AND TIMESTAMPDIFF(4,{?DATE TO},NNM_EVENT_DETAIL.EVENT_TIME)<=0)

AND ((TRAP_NAME ='niuStatChngDC' or trap_name='niuStatChngNC')
OR (TRAP_NAME ='niuStatChngNST' AND locate('RS07', NNM_EVENT_DETAIL.MESSAGE)>0))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top