Home » SQL & PL/SQL » SQL & PL/SQL » Writing SQL Query (Oracle)
Writing SQL Query [message #610412] Wed, 19 March 2014 19:25 Go to next message
rlsublime
Messages: 10
Registered: March 2014
Junior Member
I am new to SQL query creation. How can I add to or edit this code to run with the following specs:

join as_sid from ASSOCIATES to st_sid from SCHEDULE_TEMPLATE and display sum of ST_Productivehours from SCHEDULE TEMPLATE in the below query
join as_sid from ASSOCIATES to absence_sid from VW_ABSENCE_CALENDAR and display count of absence_date from VW_ABSENCE_CALENDAR in the below query


select as_sid, as_sitename, as_status,as_hiredate,as_first_last
from associates where (as_status = 'active' and as_sitename = 'Chicago') or (as_status = 'active' and as_sitename = 'Brooklyn')or (as_status = 'active' and as_sitename = 'Dallas')
 


Thank You
Re: Writing SQL Query [message #610413 is a reply to message #610412] Wed, 19 March 2014 19:30 Go to previous message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Welcome to this forum.

Since we don't have your tables or data, we can not compile, run or test posted code.
It would be helpful if you provided DDL (CREATE TABLE ...) for tables involved.
It would be helpful if you provided DML (INSERT INTO ...) for test data.
It would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/311
It would be helpful if you provided expected/desired results & a detailed explanation how & why the test data gets transformed or organized.
Previous Topic: Doubt with Associative Arrays
Next Topic: How to use application tracing in oracle
Goto Forum:
  


Current Time: Fri Apr 26 05:47:27 CDT 2024