Maximo List Archive

This is an archive of the Maximo Yahoo Community. The content of this pages may be a sometimes obsolete so please check post dates.
Thanks to the community owner Christopher Wanko for providing the content.



Re: Query to find the SR workorders in SR application

From: Paul Corbin (2011-08-30 16:06)


Reddy - Try this:
where
ticketid in (select distinct
a.recordkey
from
relatedrecord a where a.relatedrecclass = 'workorder')
Paul


From: areddy214 (2011-08-30 17:38)

Hi Paul,
Thank You! The query worked.
I have another query, I need to search the SR's based on the status of the workorder in SR application and I am using the following query, it is not displaying any results.
WHERE ticketid in (select distinct w.wonum from workorder w where w.status='WAPPR')
A
Thank You
Reddy
--- In MAXIMO@yahoogroups.com, Paul Corbin <pcorbin@...> wrote:
>
>
>
> Reddy - Try this:
>
>
>
> where
>
> ticketid in (select distinct
>
> a.recordkey
>
> from
>
> relatedrecord a where a.relatedrecclass = 'workorder')
>
>
>
> Paul
>
>
>
>


From: Paul Corbin (2011-08-30 18:21)


Reddy,
What you seem to be missing is that the work order number (wonum) does not reside in the SR table.
You must extract it from the RELATEDRECORD table. See if the following works for you.
where ticketid in (
select relatedreckey
from relatedrecord
where relatedrecclass = 'SR'
and class = 'workorder'
and recordkey in (
select wonum
from workorder
where status = 'WAPPR'))
Paul
________________________________
From: MAXIMO@yahoogroups.com [MAXIMO@yahoogroups.com] on behalf of areddy214 [areddy214@yahoo.com]
Sent: Tuesday, August 30, 2011 10:38 AM
To: MAXIMO@yahoogroups.com
Subject: [MAXIMO List] Re: Query to find the SR workorders in SR application
Hi Paul,
Thank You! The query worked.
I have another query, I need to search the SR's based on the status of the workorder in SR application and I am using the following query, it is not displaying any results.
WHERE ticketid in (select distinct w.wonum from workorder w where w.status='WAPPR')
A
Thank You
Reddy
--- In MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>, Paul Corbin <pcorbin@...> wrote:
>
>
>
> Reddy - Try this:
>
>
>
> where
>
> ticketid in (select distinct
>
> a.recordkey
>
> from
>
> relatedrecord a where a.relatedrecclass = 'workorder')
>
>
>
> Paul
>
>
>
>


From: Aravind Reddy (2011-08-30 13:01)

Paul,
 
The query works when i changed 'workorder' to 'WORKORDER'
 
WHERE  ticketid in (
select relatedreckey
from relatedrecord
where relatedrecclass = 'SR'
and class = 'WORKORDER'
and recordkey in (
  select wonum
  from workorder
  where status = 'WAPPR'))
 
Thank You
Aravind
From: Paul Corbin <pcorbin@ussposco.com>
To: "MAXIMO@yahoogroups.com" <MAXIMO@yahoogroups.com>
Sent: Tuesday, August 30, 2011 1:21 PM
Subject: RE: [MAXIMO List] Re: Query to find the SR workorders in SR application
Reddy,
What you seem to be missing is that the work order number (wonum) does not reside in the SR table.
You must extract it from the RELATEDRECORD table.  See if the following works for you.
where ticketid in (
select relatedreckey
from relatedrecord
where relatedrecclass = 'SR'
and class = 'workorder'
and recordkey in (
  select wonum
  from workorder
  where status = 'WAPPR'))
Paul
________________________________
From: MAXIMO@yahoogroups.com [MAXIMO@yahoogroups.com] on behalf of areddy214 [areddy214@yahoo.com]
Sent: Tuesday, August 30, 2011 10:38 AM
To: MAXIMO@yahoogroups.com
Subject: [MAXIMO List] Re: Query to find the SR workorders in SR application
Hi Paul,
Thank You! The query worked.
I have another query, I need to search the SR's based on the status of the workorder in SR application and I am using the following query, it is not displaying any results.
WHERE ticketid in (select distinct w.wonum from workorder w where w.status='WAPPR')
A
Thank You
Reddy
--- In MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>, Paul Corbin <pcorbin@...> wrote:
>
>
>
> Reddy - Try this:
>
>
>
> where
>
> ticketid in (select distinct
>
> a.recordkey
>
> from
>
> relatedrecord a where a.relatedrecclass = 'workorder')
>
>
>
> Paul
>
>
>
>

------------------------------------
Email addresses you might need:
Posting: MAXIMO@yahoogroups.com
Join  : MAXIMO-subscribe@yahoogroups.com
Leave  : MAXIMO-unsubscribe@yahoogroups.com
Cry    : MAXIMO-owner@yahoogroups.com
Group  : http://groups.yahoo.com/group/MAXIMOYahoo! Groups Links


From: Paul Corbin (2011-08-30 20:25)

I'm glad you were able to get it to work. I ran that on a SQL Server 2005 database and it worked without the case change. What database are you using?
________________________________
From: MAXIMO@yahoogroups.com [MAXIMO@yahoogroups.com] on behalf of Aravind Reddy [areddy214@yahoo.com]
Sent: Tuesday, August 30, 2011 1:01 PM
To: MAXIMO@yahoogroups.com
Subject: Re: [MAXIMO List] Re: Query to find the SR workorders in SR application
Paul,
The query works when i changed 'workorder' to 'WORKORDER'
WHERE ticketid in (
select relatedreckey
from relatedrecord
where relatedrecclass = 'SR'
and class = 'WORKORDER'
and recordkey in (
select wonum
from workorder
where status = 'WAPPR'))
Thank You
Aravind
From: Paul Corbin <pcorbin@ussposco.com<mailto:pcorbin%40ussposco.com>>
To: "MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>" <MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>>
Sent: Tuesday, August 30, 2011 1:21 PM
Subject: RE: [MAXIMO List] Re: Query to find the SR workorders in SR application
Reddy,
What you seem to be missing is that the work order number (wonum) does not reside in the SR table.
You must extract it from the RELATEDRECORD table. See if the following works for you.
where ticketid in (
select relatedreckey
from relatedrecord
where relatedrecclass = 'SR'
and class = 'workorder'
and recordkey in (
select wonum
from workorder
where status = 'WAPPR'))
Paul
________________________________
From: MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com> [MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>] on behalf of areddy214 [areddy214@yahoo.com<mailto:areddy214%40yahoo.com>]
Sent: Tuesday, August 30, 2011 10:38 AM
To: MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>
Subject: [MAXIMO List] Re: Query to find the SR workorders in SR application
Hi Paul,
Thank You! The query worked.
I have another query, I need to search the SR's based on the status of the workorder in SR application and I am using the following query, it is not displaying any results.
WHERE ticketid in (select distinct w.wonum from workorder w where w.status='WAPPR')
A
Thank You
Reddy
--- In MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com><mailto:MAXIMO%40yahoogroups.com>, Paul Corbin <pcorbin@...> wrote:
>
>
>
> Reddy - Try this:
>
>
>
> where
>
> ticketid in (select distinct
>
> a.recordkey
>
> from
>
> relatedrecord a where a.relatedrecclass = 'workorder')
>
>
>
> Paul
>
>
>
>
------------------------------------
Email addresses you might need:
Posting: MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>
Join : MAXIMO-subscribe@yahoogroups.com<mailto:MAXIMO-subscribe%40yahoogroups.com>
Leave : MAXIMO-unsubscribe@yahoogroups.com<mailto:MAXIMO-unsubscribe%40yahoogroups.com>
Cry : MAXIMO-owner@yahoogroups.com<mailto:MAXIMO-owner%40yahoogroups.com>
Group : http://groups.yahoo.com/group/MAXIMOYahoo! Groups Links


From: Aravind Reddy (2011-08-30 14:50)

We use oracle 10g.
From: Paul Corbin <pcorbin@ussposco.com>
To: "MAXIMO@yahoogroups.com" <MAXIMO@yahoogroups.com>
Sent: Tuesday, August 30, 2011 3:25 PM
Subject: RE: [MAXIMO List] Re: Query to find the SR workorders in SR application
I'm glad you were able to get it to work.  I ran that on a SQL Server 2005 database and it worked without the case change.  What database are you using?
________________________________
From: MAXIMO@yahoogroups.com [MAXIMO@yahoogroups.com] on behalf of Aravind Reddy [areddy214@yahoo.com]
Sent: Tuesday, August 30, 2011 1:01 PM
To: MAXIMO@yahoogroups.com
Subject: Re: [MAXIMO List] Re: Query to find the SR workorders in SR application
Paul,
The query works when i changed 'workorder' to 'WORKORDER'
WHERE  ticketid in (
select relatedreckey
from relatedrecord
where relatedrecclass = 'SR'
and class = 'WORKORDER'
and recordkey in (
  select wonum
  from workorder
  where status = 'WAPPR'))
Thank You
Aravind
From: Paul Corbin <pcorbin@ussposco.com<mailto:pcorbin%40ussposco.com>>
To: "MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>" <MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>>
Sent: Tuesday, August 30, 2011 1:21 PM
Subject: RE: [MAXIMO List] Re: Query to find the SR workorders in SR application
Reddy,
What you seem to be missing is that the work order number (wonum) does not reside in the SR table.
You must extract it from the RELATEDRECORD table.  See if the following works for you.
where ticketid in (
select relatedreckey
from relatedrecord
where relatedrecclass = 'SR'
and class = 'workorder'
and recordkey in (
  select wonum
  from workorder
  where status = 'WAPPR'))
Paul
________________________________
From: MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com> [MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>] on behalf of areddy214 [areddy214@yahoo.com<mailto:areddy214%40yahoo.com>]
Sent: Tuesday, August 30, 2011 10:38 AM
To: MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>
Subject: [MAXIMO List] Re: Query to find the SR workorders in SR application
Hi Paul,
Thank You! The query worked.
I have another query, I need to search the SR's based on the status of the workorder in SR application and I am using the following query, it is not displaying any results.
WHERE ticketid in (select distinct w.wonum from workorder w where w.status='WAPPR')
A
Thank You
Reddy
--- In MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com><mailto:MAXIMO%40yahoogroups.com>, Paul Corbin <pcorbin@...> wrote:
>
>
>
> Reddy - Try this:
>
>
>
> where
>
> ticketid in (select distinct
>
> a.recordkey
>
> from
>
> relatedrecord a where a.relatedrecclass = 'workorder')
>
>
>
> Paul
>
>
>
>
------------------------------------
Email addresses you might need:
Posting: MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>
Join  : MAXIMO-subscribe@yahoogroups.com<mailto:MAXIMO-subscribe%40yahoogroups.com>
Leave  : MAXIMO-unsubscribe@yahoogroups.com<mailto:MAXIMO-unsubscribe%40yahoogroups.com>
Cry    : MAXIMO-owner@yahoogroups.com<mailto:MAXIMO-owner%40yahoogroups.com>
Group  : http://groups.yahoo.com/group/MAXIMOYahoo! Groups Links

------------------------------------
Email addresses you might need:
Posting: MAXIMO@yahoogroups.com
Join  : MAXIMO-subscribe@yahoogroups.com
Leave  : MAXIMO-unsubscribe@yahoogroups.com
Cry    : MAXIMO-owner@yahoogroups.com
Group  : http://groups.yahoo.com/group/MAXIMOYahoo! Groups Links