PROMPT Creating view load_attempt_v1;
CREATE OR REPLACE FORCE VIEW load_attempt_v1
( load_id,
  bag_tag,
  load_time,
  flight_id,
	agent_code,
	location_desc
)
as
select a.load_id,
      a.bag_tag,
			to_char(a.load_time, 'dd-mon-yy hh24:mi'),
		  a.flight_id,
			b.agent_code,
			c.location_description
  from load_attempt a,  tagtrak_users b, location c 
	 where a.user_id = b.user_id
		 and a.location_code = c.location_code;

