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.



Query help in WO application.

From: areddy214 (2011-12-06 17:09)

Hi All,
I am using the following query to display the wo's not having any labor records in the actuals tab, the result is displaying 0 records actually it should display 756 records. Please help me on this query for any corrections.
WHERE status = 'COMP' and istask = 0 and siteid = 'XXX' and wonum in (select a.refwo from labtrans a where a.laborcode is null)
I changed the above query as shown below to display the wo's having labor records it's working fine and displayed the wo's.
WHERE status = 'COMP' and istask = 0 and siteid = 'XXX' and wonum in (select a.refwo from labtrans a where a.laborcode is not null)
Thanks
Reddy


From: Victor (2011-12-06 17:29)

Hi Reddy,
Please try this :
WHERE status = 'COMP' and istask = 0 and siteid = 'XXX' and not exists (select 1 from labtrans a where a.refwo=workorder.wonum and a.siteid=workorder.wonum)
Hope this helps.
Thanks & regards,
Victor.
--- In MAXIMO@yahoogroups.com, "areddy214" <areddy214@...> wrote:
>
> Hi All,
>
> I am using the following query to display the wo's not having any labor records in the actuals tab, the result is displaying 0 records actually it should display 756 records. Please help me on this query for any corrections.
>
> WHERE status = 'COMP' and istask = 0 and siteid = 'XXX' and wonum in (select a.refwo from labtrans a where a.laborcode is null)
>
> I changed the above query as shown below to display the wo's having labor records it's working fine and displayed the wo's.
>
> WHERE status = 'COMP' and istask = 0 and siteid = 'XXX' and wonum in (select a.refwo from labtrans a where a.laborcode is not null)
>
> Thanks
> Reddy
>


From: Aravind Reddy (2011-12-06 09:52)

Hi Victor,
 
When I used the query that you sent, it's displaying both the wo's having labor records and not having the labor records.
 
Thanks
Reddy
________________________________
From: Victor <vikas17.j@gmail.com>
To: MAXIMO@yahoogroups.com
Sent: Tuesday, December 6, 2011 11:29 AM
Subject: [MAXIMO List] Re: Query help in WO application.
 
Hi Reddy,
Please try this :
WHERE status = 'COMP' and istask = 0 and siteid = 'XXX' and not exists (select 1 from labtrans a where a.refwo=workorder.wonum and a.siteid=workorder.wonum)
Hope this helps.
Thanks & regards,
Victor.
--- In MAXIMO@yahoogroups.com, "areddy214" <areddy214@...> wrote:
>
> Hi All,
>
> I am using the following query to display the wo's not having any labor records in the actuals tab, the result is displaying 0 records actually it should display 756 records. Please help me on this query for any corrections.
>
> WHERE status = 'COMP' and istask = 0 and siteid = 'XXX' and wonum in (select a.refwo from labtrans a where a.laborcode is null)
>
> I changed the above query as shown below to display the wo's having labor records it's working fine and displayed the wo's.
>
> WHERE status = 'COMP' and istask = 0 and siteid = 'XXX' and wonum in (select a.refwo from labtrans a where a.laborcode is not null)
>
> Thanks
> Reddy
>


From: Victor (2011-12-06 18:15)


Hi Reddy,
I do not think it should do it. Still I found one mistake in the istask condition, as I copied it from your query I left it as it is, and by mistake I compared siteid with wonum in the not exist clause haha.
Please find the modified one below :
WHERE status = 'COMP' and istask = '0' and siteid = 'XXX' and not exists (select 1 from labtrans a where a.refwo=workorder.wonum and a.siteid=workorder.siteid)
Thanks & regards,
Victor.
--- In MAXIMO@yahoogroups.com, Aravind Reddy <areddy214@...> wrote:
>
> Hi Victor,
>  
> When I used the query that you sent, it's displaying both the wo's having labor records and not having the labor records.
>  
> Thanks
> Reddy
>
>
> ________________________________
> From: Victor <vikas17.j@...>
> To: MAXIMO@yahoogroups.com
> Sent: Tuesday, December 6, 2011 11:29 AM
> Subject: [MAXIMO List] Re: Query help in WO application.
>
>
>  
> Hi Reddy,
>
> Please try this :
>
> WHERE status = 'COMP' and istask = 0 and siteid = 'XXX' and not exists (select 1 from labtrans a where a.refwo=workorder.wonum and a.siteid=workorder.wonum)
>
> Hope this helps.
>
> Thanks & regards,
> Victor.
>
> --- In MAXIMO@yahoogroups.com, "areddy214" <areddy214@> wrote:
> >
> > Hi All,
> >
> > I am using the following query to display the wo's not having any labor records in the actuals tab, the result is displaying 0 records actually it should display 756 records. Please help me on this query for any corrections.
> >
> > WHERE status = 'COMP' and istask = 0 and siteid = 'XXX' and wonum in (select a.refwo from labtrans a where a.laborcode is null)
> >
> > I changed the above query as shown below to display the wo's having labor records it's working fine and displayed the wo's.
> >
> > WHERE status = 'COMP' and istask = 0 and siteid = 'XXX' and wonum in (select a.refwo from labtrans a where a.laborcode is not null)
> >
> > Thanks
> > Reddy
> >
>
>
>
>
>
>


From: Aravind Reddy (2011-12-06 10:45)

Hi Victor,
 
The following query worked
 WHERE  status = 'COMP' and istask = '0' and siteid = 'XXX' and  not exists (select 1 from labtrans a where a.refwo=workorder.wonum)
 
You are always helpful!
 
Thanks
Reddy
 
________________________________
From: Victor <vikas17.j@gmail.com>
To: MAXIMO@yahoogroups.com
Sent: Tuesday, December 6, 2011 12:15 PM
Subject: [MAXIMO List] Re: Query help in WO application.
 
Hi Reddy,
I do not think it should do it. Still I found one mistake in the istask condition, as I copied it from your query I left it as it is, and by mistake I compared siteid with wonum in the not exist clause haha.
Please find the modified one below :
WHERE status = 'COMP' and istask = '0' and siteid = 'XXX' and not exists (select 1 from labtrans a where a.refwo=workorder.wonum and a.siteid=workorder.siteid)
Thanks & regards,
Victor.
--- In MAXIMO@yahoogroups.com, Aravind Reddy <areddy214@...> wrote:
>
> Hi Victor,
>  
> When I used the query that you sent, it's displaying both the wo's having labor records and not having the labor records.
>  
> Thanks
> Reddy
>
>
> ________________________________
> From: Victor <vikas17.j@...>
> To: MAXIMO@yahoogroups.com
> Sent: Tuesday, December 6, 2011 11:29 AM
> Subject: [MAXIMO List] Re: Query help in WO application.
>
>
>  
> Hi Reddy,
>
> Please try this :
>
> WHERE status = 'COMP' and istask = 0 and siteid = 'XXX' and not exists (select 1 from labtrans a where a.refwo=workorder.wonum and a.siteid=workorder.wonum)
>
> Hope this helps.
>
> Thanks & regards,
> Victor.
>
> --- In MAXIMO@yahoogroups.com, "areddy214" <areddy214@> wrote:
> >
> > Hi All,
> >
> > I am using the following query to display the wo's not having any labor records in the actuals tab, the result is displaying 0 records actually it should display 756 records. Please help me on this query for any corrections.
> >
> > WHERE status = 'COMP' and istask = 0 and siteid = 'XXX' and wonum in (select a.refwo from labtrans a where a.laborcode is null)
> >
> > I changed the above query as shown below to display the wo's having labor records it's working fine and displayed the wo's.
> >
> > WHERE status = 'COMP' and istask = 0 and siteid = 'XXX' and wonum in (select a.refwo from labtrans a where a.laborcode is not null)
> >
> > Thanks
> > Reddy
> >
>
>
>
>
>
>


From: Victor (2011-12-06 18:48)

Good Job :) !
Thanks,
Victor.
--- In MAXIMO@yahoogroups.com, Aravind Reddy <areddy214@...> wrote:
>
> Hi Victor,
>  
> The following query worked
>  WHERE  status = 'COMP' and istask = '0' and siteid = 'XXX' and  not exists (select 1 from labtrans a where a.refwo=workorder.wonum)
>  
> You are always helpful!
>  
> Thanks
> Reddy
>  
>
>
> ________________________________
> From: Victor <vikas17.j@...>
> To: MAXIMO@yahoogroups.com
> Sent: Tuesday, December 6, 2011 12:15 PM
> Subject: [MAXIMO List] Re: Query help in WO application.
>
>
>  
>
> Hi Reddy,
>
> I do not think it should do it. Still I found one mistake in the istask condition, as I copied it from your query I left it as it is, and by mistake I compared siteid with wonum in the not exist clause haha.
>
> Please find the modified one below :
>
> WHERE status = 'COMP' and istask = '0' and siteid = 'XXX' and not exists (select 1 from labtrans a where a.refwo=workorder.wonum and a.siteid=workorder.siteid)
>
> Thanks & regards,
> Victor.
>
> --- In MAXIMO@yahoogroups.com, Aravind Reddy <areddy214@> wrote:
> >
> > Hi Victor,
> >  
> > When I used the query that you sent, it's displaying both the wo's having labor records and not having the labor records.
> >  
> > Thanks
> > Reddy
> >
> >
> > ________________________________
> > From: Victor <vikas17.j@>
> > To: MAXIMO@yahoogroups.com
> > Sent: Tuesday, December 6, 2011 11:29 AM
> > Subject: [MAXIMO List] Re: Query help in WO application.
> >
> >
> >  
> > Hi Reddy,
> >
> > Please try this :
> >
> > WHERE status = 'COMP' and istask = 0 and siteid = 'XXX' and not exists (select 1 from labtrans a where a.refwo=workorder.wonum and a.siteid=workorder.wonum)
> >
> > Hope this helps.
> >
> > Thanks & regards,
> > Victor.
> >
> > --- In MAXIMO@yahoogroups.com, "areddy214" <areddy214@> wrote:
> > >
> > > Hi All,
> > >
> > > I am using the following query to display the wo's not having any labor records in the actuals tab, the result is displaying 0 records actually it should display 756 records. Please help me on this query for any corrections.
> > >
> > > WHERE status = 'COMP' and istask = 0 and siteid = 'XXX' and wonum in (select a.refwo from labtrans a where a.laborcode is null)
> > >
> > > I changed the above query as shown below to display the wo's having labor records it's working fine and displayed the wo's.
> > >
> > > WHERE status = 'COMP' and istask = 0 and siteid = 'XXX' and wonum in (select a.refwo from labtrans a where a.laborcode is not null)
> > >
> > > Thanks
> > > Reddy
> > >
> >
> >
> >
> >
> >
> >
>
>
>
>
>
>


From: Victor (2011-12-06 18:48)

Good Job :) !
Thanks,
Victor.
--- In MAXIMO@yahoogroups.com, Aravind Reddy <areddy214@...> wrote:
>
> Hi Victor,
>  
> The following query worked
>  WHERE  status = 'COMP' and istask = '0' and siteid = 'XXX' and  not exists (select 1 from labtrans a where a.refwo=workorder.wonum)
>  
> You are always helpful!
>  
> Thanks
> Reddy
>  
>
>
> ________________________________
> From: Victor <vikas17.j@...>
> To: MAXIMO@yahoogroups.com
> Sent: Tuesday, December 6, 2011 12:15 PM
> Subject: [MAXIMO List] Re: Query help in WO application.
>
>
>  
>
> Hi Reddy,
>
> I do not think it should do it. Still I found one mistake in the istask condition, as I copied it from your query I left it as it is, and by mistake I compared siteid with wonum in the not exist clause haha.
>
> Please find the modified one below :
>
> WHERE status = 'COMP' and istask = '0' and siteid = 'XXX' and not exists (select 1 from labtrans a where a.refwo=workorder.wonum and a.siteid=workorder.siteid)
>
> Thanks & regards,
> Victor.
>
> --- In MAXIMO@yahoogroups.com, Aravind Reddy <areddy214@> wrote:
> >
> > Hi Victor,
> >  
> > When I used the query that you sent, it's displaying both the wo's having labor records and not having the labor records.
> >  
> > Thanks
> > Reddy
> >
> >
> > ________________________________
> > From: Victor <vikas17.j@>
> > To: MAXIMO@yahoogroups.com
> > Sent: Tuesday, December 6, 2011 11:29 AM
> > Subject: [MAXIMO List] Re: Query help in WO application.
> >
> >
> >  
> > Hi Reddy,
> >
> > Please try this :
> >
> > WHERE status = 'COMP' and istask = 0 and siteid = 'XXX' and not exists (select 1 from labtrans a where a.refwo=workorder.wonum and a.siteid=workorder.wonum)
> >
> > Hope this helps.
> >
> > Thanks & regards,
> > Victor.
> >
> > --- In MAXIMO@yahoogroups.com, "areddy214" <areddy214@> wrote:
> > >
> > > Hi All,
> > >
> > > I am using the following query to display the wo's not having any labor records in the actuals tab, the result is displaying 0 records actually it should display 756 records. Please help me on this query for any corrections.
> > >
> > > WHERE status = 'COMP' and istask = 0 and siteid = 'XXX' and wonum in (select a.refwo from labtrans a where a.laborcode is null)
> > >
> > > I changed the above query as shown below to display the wo's having labor records it's working fine and displayed the wo's.
> > >
> > > WHERE status = 'COMP' and istask = 0 and siteid = 'XXX' and wonum in (select a.refwo from labtrans a where a.laborcode is not null)
> > >
> > > Thanks
> > > Reddy
> > >
> >
> >
> >
> >
> >
> >
>
>
>
>
>
>