Hi,
I hope the following query solve your purpose.
select rw.rpm_with_id,
'ASSIGNED'
from daily_job dj, rpm_with rw
where rw.rpm_with_node_id = dj.job_assignee_node_id
and dj.job_assignee_node_id = rw.rpm_with_node_id
union
select rw.rpm_with_id,
'UNASSIGNED'
from daily_job dj, rpm_with rw
where rw.rpm_with_node_id = dj.job_assignee_node_id
and dj.job_assignee_node_id <> rw.rpm_with_node_id
Regards,
Suresh G
-----Original Message-----
From: Judesahayaraj A.
[mailto:db2udbdba-ezmlmshield-x85981579.[Email address protected]
Sent: Monday, January 21, 2008 9:10 PM
To: LazyDBA Discussion
Subject: Reg. Query Without CASE statement
Hi All,
I am in need of a query without using a case statement in the
query listed below.
Here is the query:
select rw.rpm_with_id, case when dj.job_assignee_node_id =
rw.rpm_with_node_id then 'ASSIGNED' else 'UNASSIGNED'
end from daily_job dj, rpm_with rw
where rw.rpm_with_node_id =
dj.job_assignee_node_id
Thanks in advance.
Regards,
Jude
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and
attachments please check them for viruses and defect.
-----------------------------------------------------------------------------------------------------------------------
DB2 & UDB email list listserv db2-l LazyDBA home page