Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

oracle query

Posted on 2012-03-30
4
Medium Priority
?
390 Views
Last Modified: 2012-03-30
select ds.schedule_date,ds.start_hours||':'||ds.start_minutes||ds.start_ampm start_time,  
       ds.end_hours||':'||ds.end_minutes||'0'||ds.end_ampm end_time,
       first_name || ',' || mail_last_name new_name,
         ds.position,reason_code
from dept_staff ds, emp_unexcld eu
where ds.payroll_id = eu.payroll_id
and ds.schedule_date = '01-apr-2012'
order by schedule_date,ds.start_time,mail_last_name
-----------------------------------
SCHEDULE_DATE  START_TIME  END_TIME NEW_NAME           POSITION  REASON_CODE
4/1/2012        5:45A         2:00P  Barbara A,Ardelean   SRPM      SH
4/1/2012        5:45A         2:00P  Nichole S,Baines     PHMB      SH
4/1/2012        5:45A         2:00P  Thomas A,Cutter      TLMB      SH
4/1/2012        5:45A         2:00P  Adrian A,Fis         TLMB      SH
4/1/2012        5:45A         2:00P  Mandy,Lemke          PHMB      SH
4/1/2012        5:45A         2:00P  Nancy M,Penna        PHMB      SH
4/1/2012        5:45A         2:00P  Nyisha D,Richardson  SRPM      SH
-----------------In the Beginning I want Day - Sunday and then schedule_date, start_time
April 2nd is a Monday and I want Monday and then schedule_date
0
Comment
Question by:anumoses
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 1000 total points
ID: 37788360
Add it with to_char?

select to_char(ds.schedule_date,'Day'),ds.schedule_date,ds.start_hours||':'||ds.start_minutes
0
 
LVL 6

Author Comment

by:anumoses
ID: 37788374
I also want one more column end time minus start time as tot hrs (8.25)
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37788388
>>I also want one more column end time minus start time

That wasn't part of this question.

Anyway: so add it.  Isn't that the output from your previous question?  Just incorporate that logic into this query.  It should just be another column.
0
 
LVL 6

Author Closing Comment

by:anumoses
ID: 37788433
thanks
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question