Highlighted
Honored Contributor.
Honored Contributor.
337 views

Converting SQL Query to use in View

 Hi Experts,

 I have a requirement to show the list of incidents which has opened before 7 days with respect to logical name in View/Favourites.

 So I have written a query in SQL.

 select NUMBER, LOGICAL_NAME  from PROBSUMMARYM1 where  OPEN_TIME>='2018-03-10' and LOGICAL_NAME in (select LOGICAL_NAME from PROBSUMMARYM1) order by LOGICAL_NAME

 I need the equivalent query to do it in View.

 i know OPEN_TIME>='XXXXXXXX'  this can be written like this    open.time>=date(tod()) - '7 00:00:00', but not sure how to do the inner query.

 Any Suggestions are appreciated. Thank You.

0 Likes
2 Replies
Highlighted
Super Contributor.
Super Contributor.

Re: Converting SQL Query to use in View

Hi!

You can create an Inbox record with query: "open.time>=(tod()-'7 00:00:00')" and with "Group by" button choose logical.name field

0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

Re: Converting SQL Query to use in View

Thank You.

Also, Need to know, In case, If we are using chart then how to get/show only the Top 10

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.