Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
|
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 17th, 2006, 11:41 AM
Registered User
 
Join Date: Jun 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default add condition to COMMAND;ignore records for 3 min

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_D ETAIL.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))






Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about counting records based on condition TheBlueSky Crystal Reports 1 May 31st, 2006 03:35 AM
Condition before insert the records mateenmohd SQL Server 2000 0 February 7th, 2005 09:13 AM
sql command to find duplicate records? qwjunk Classic ASP Databases 1 January 31st, 2004 03:32 PM
How to add records hdvan SQL Server ASP 2 September 24th, 2003 12:43 AM
count records where condition not true (IIF??) rpeksens Access 3 September 19th, 2003 03:36 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.