#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2011
    Posts
    1
    Rep Power
    0

    Help with Oracle SQL*Plus Query assignment


    Hey,

    I'm currently working on a lab assignment for class.

    Assignment is located here:
    hal.cs.camosun (dot) bc.ca/~weston/comp155/tyo/Lab3.html

    The assignment states to write 3 queries in both the SQL:1999 version and the SQL Traditional (older version)

    I didn't read that part, and so I created 3 queries and I don't know which ones are 1999 and which ones are traditional.

    I would really appreciate it if someone helps me sort this problem out

    So overall I need to have 6 queries in total. 3 for the SQL 1999 version and 3 for the SQL traditional (older) version

    1.)

    SELECT e.last_name, e.job_id, e.department_id, d.department_name
    FROM employees e JOIN departments d
    ON (e.department_id = d.department_id)
    JOIN locations l
    ON (d.location_id = l.location_id)
    WHERE LOWER(l.city) = 'toronto';

    2.)

    SELECT e.last_name, d.department_name
    FROM employees e, departments d
    WHERE e.department_id = d.department_id AND last_name LIKE 'G%';

    3.)

    SELECT e.last_name "Employee", e.employee_id "Emp#", m.last_name "Manager", m.employee_id "Mgr#"
    FROM employees e INNER JOIN employees m
    ON e.manager_id = m.employee_id
    AND UPPER(e.last_name) LIKE 'G%';

    Thanks
  2. #2
  3. Humble Learner
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2007
    Location
    Bangalore, India
    Posts
    280
    Rep Power
    119
    You need to understand the difference between ASNI SQL and earlier versions to write all that.

IMN logo majestic logo threadwatch logo seochat tools logo