     RETURN VARCHAR
   IS
     schema_srid INTEGER;
-      unknown_srs_ex EXCEPTION;
-    BEGIN
-      EXECUTE IMMEDIATE 'SELECT COUNT(SRID) FROM MDSYS.CS_SRS WHERE SRID=:1' INTO schema_srid USING srsno;
-
-      IF schema_srid = 0
-      THEN
-        RAISE unknown_srs_ex;
-      END IF;
-
-      RETURN 'SRID ok';
-
-      EXCEPTION
+    unknown_srs_ex EXCEPTION;
+  BEGIN
+    SELECT COUNT(srid) INTO schema_srid FROM mdsys.cs_srs WHERE srid = srsno;
+
+    IF schema_srid = 0 THEN
+      RAISE unknown_srs_ex;
+    END IF;
+
+    RETURN 'SRID ok';
+
+    EXCEPTION
       WHEN unknown_srs_ex THEN
-      dbms_output.put_line('Table MDSYS.CS_SRS does not contain the SRID ' || srsno);
-      RETURN 'SRID not ok';
-    END;
+        dbms_output.put_line('Table MDSYS.CS_SRS does not contain the SRID ' || srsno);
+        RETURN 'SRID not ok';
+  END;
 
   /*****************************************************************
   * is_db_coord_ref_sys_3d

  FUNCTION is_db_coord_ref_sys_3d
    RETURN NUMBER
  IS
    srid NUMBER;
    BEGIN
      EXECUTE IMMEDIATE 'SELECT srid from DATABASE_SRS' INTO srid;
      RETURN is_coord_ref_sys_3d(srid);
    END;

  /*****************************************************************
  * get_dim

    RETURN NUMBER
  IS
    is_3d NUMBER(1, 0);
  BEGIN
    SELECT 3 INTO is_3d FROM user_sdo_geom_metadata m, TABLE(m.diminfo) dim
      WHERE table_name = t_name AND column_name = c_name AND dim.sdo_dimname = 'Z';

    RETURN is_3d;

    EXCEPTION
      WHEN NO_DATA_FOUND THEN
        RETURN 2;
  END;

  /*****************************************************************
  * change_column_srid
