/* $Id$ */
/*============================================================================*
 |                 Copyright (c) 2010 Applaud Solutions UK Ltd                |
 |                             All rights reserved                            |
 *===========================================================================*/

SET VERIFY OFF
SET FEEDBACK OFF
WHENEVER OSERROR  EXIT FAILURE ROLLBACK
WHENEVER SQLERROR EXIT FAILURE ROLLBACK

DECLARE
  e_obj_not_exists EXCEPTION;
  PRAGMA EXCEPTION_INIT(e_obj_not_exists, -04043);
BEGIN
  EXECUTE IMMEDIATE 'DROP TYPE xxas_com_asg_varray';
  EXECUTE IMMEDIATE 'DROP TYPE xxas_com_asg_type';
EXCEPTION
  WHEN e_obj_not_exists THEN
    NULL;
END;
/

CREATE TYPE XXAS_COM_ASG_TYPE AS OBJECT
  (assignment_id        number
  ,effective_start_date date
  ,effective_end_date   date
  ,fte                  number
  ,status               varchar2(400)
  ,job_title            varchar2(400)
  ,worker_type          varchar2(400)
  ,job_name             varchar2(400)
  ,position_name        varchar2(400)
  ,department           varchar2(400)
  ,service              varchar2(400)
  ,location             varchar2(400)
  ,location_address     varchar2(4000)
  ,longtitude           number
  ,latitude             number)
/

CREATE TYPE XXAS_COM_ASG_VARRAY AS
VARRAY(100000) OF xxas_com_asg_type
/

COMMIT;
EXIT;
