title: Invalid data type PL/SQL
body: <p>I have the following-</p>
  
  <pre><code> TYPE station_record_type IS RECORD
      (
          station_code  t_stations.station_code%TYPE,
          city_name d_cities.city_name%TYPE,
          station_name d_stations.station_name%TYPE,
          state_name gis_states.state_name%TYPE,
         country_name d_countries.country_name%TYPE,
          record_type pls_integer
      );
  
      TYPE stations_table_type IS TABLE OF station_record_type
         INDEX BY BINARY_INTEGER;
  
  
    o_stations_to_retrieve      stations_table_type
  </code></pre>
  
  <p>I am trying to sort the collection  using --</p>
  
  <pre><code>    SELECT CAST (MULTISET (SELECT station_record_type (station_code,
                                                           city_name,
                                                           station_name,
                                                           state_name,
                                                           country_name,
                                                           record_type)
                                 FROM TABLE (o_stations_to_retrieve)
                             ORDER BY country_name,
                                      state_name,
                                      city_name,
                                      record_type,
                                      station_name ) AS stations_table_type)
        INTO o_stations_to_retrieve
        FROM DUAL;
  </code></pre>
  
  <p>I received the error Invalid data type for stations_table_type. How can I fix it?</p>