Select text from
Job_runs, intcodes where
Status = code;
Michael Peel
-----Original Message-----
From: Chad GARRISON
[mailto:oracledba-ezmlmshield-x66759319.[Email address protected]
Sent: 29 September 2006 14:34
To: LazyDBA Discussion
Subject: Query Help
I am trying to do the following in a query.
When I query the status from the job_runs table it displays the status
in code format. But I want to display it in text format. There is a
table (intcodes) that defines what the codes equal. How do I tie the 2
tables together to display the status in text form not in code form
within the query.
SQL> select status
2 from job_runs;
STATUS
----------
4
4
4
4
4
4
4
4
4
4
SQL> select *
2 from intcodes;
FLD CODE TEXT
------------------------------ ---------- -----------
status 0
status 1 RUNNING
status 3 STARTING
status 4 SUCCESS
status 5 FAILURE
status 6 TERMINATED
status 7 ON_ICE
status 8 INACTIVE
status 9 ACTIVATED
status 10 RESTART
status 11 ON_HOLD
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , 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
**********************************************************************
This e-mail is confidential and may be privileged.
It may only be read, copied and used by the intended recipient.
If you have received it in error please contact the sender immediately
by return e-mail. Please then delete the e-mail and any copies of it
and do not use or disclose its contents to any person.
**********************************************************************
Oracle LazyDBA home page