DBA Data[Home] [Help]

APPS.FND_FILE_MIME_TYPES_PKG SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 4

PROCEDURE INSERT_ROW (X_ROWID in out nocopy VARCHAR2,
                      X_MIME_TYPE in VARCHAR2,
                      X_CP_FORMAT_CODE in VARCHAR2 DEFAULT NULL,
                      X_CTX_FORMAT_CODE in VARCHAR2 default 'IGNORE',
                      X_CREATION_DATE in DATE DEFAULT SYSDATE,
                      X_CREATED_BY in NUMBER,
                      X_LAST_UPDATE_DATE in DATE DEFAULT SYSDATE,
                      X_LAST_UPDATED_BY in NUMBER,
                      X_LAST_UPDATE_LOGIN in NUMBER DEFAULT NULL,
                      X_FILE_EXT in VARCHAR2,
                      X_ALLOW_FILE_UPLOAD in VARCHAR2)  IS

 cursor C is select rowid from fnd_mime_types
  where lower(mime_type) = lower(x_mime_type)
  and nvl(lower(file_ext),'NULL') = nvl(lower(x_file_ext),'NULL');
Line: 20

 cursor cnt is select count(*) from fnd_mime_types
    where lower(mime_type) = lower(x_mime_type)
    and nvl(lower(file_ext),'NULL') = nvl(lower(x_file_ext),'NULL');
Line: 30

/*  Checking if a record exists before attempting to insert a record.
 *  Using 2 cursors so that whether a record exists or not the rowid
 *  can be retrieved and returned to the caller
 */

  if (chk_exists = 0) then
     select fnd_mime_types_s.NEXTVAL into x_mime_type_id from dual;
Line: 38

     INSERT INTO fnd_mime_types (mime_type_id,
                                 mime_type,
                                 cp_format_code,
                                 ctx_format_code,
                                 creation_date,
                                 created_by,
                                 last_update_date,
                                 last_updated_by,
                                 last_update_login,
                                 file_ext,
                                 allow_file_upload)
                        VALUES
                                (x_mime_type_id,
                                 x_mime_type,
                                 x_cp_format_code,
                                 x_ctx_format_code,
                                 x_creation_date,
                                 x_created_by,
                                 x_last_update_date,
                                 x_last_updated_by,
                                 x_last_update_login,
                                 x_file_ext,
                                 x_allow_file_upload);
Line: 76

 END INSERT_ROW;
Line: 79

PROCEDURE UPDATE_ROW (X_MIME_TYPE in VARCHAR2,
                      X_CP_FORMAT_CODE in VARCHAR2,
                      X_CTX_FORMAT_CODE in VARCHAR2,
                      X_LAST_UPDATE_DATE in DATE,
                      X_LAST_UPDATED_BY in NUMBER,
                      X_LAST_UPDATE_LOGIN in NUMBER DEFAULT NULL,
                      X_FILE_EXT in VARCHAR2,
                      X_ALLOW_FILE_UPLOAD in VARCHAR2) IS

l_cp_format_code varchar2(4);
Line: 95

          select decode(x_cp_format_code,fnd_file_mime_types_pkg.null_char,null,null,m.cp_format_code,x_cp_format_code),
                 decode(x_ctx_format_code,fnd_file_mime_types_pkg.null_char,null,null,m.ctx_format_code,x_ctx_format_code),
                 decode(x_file_ext,fnd_file_mime_types_pkg.null_char,null,null,m.file_ext,x_file_ext),
                 decode(x_allow_file_upload,fnd_file_mime_types_pkg.null_char,null,null,m.allow_file_upload,x_allow_file_upload)
          into l_cp_format_code, l_ctx_format_code, l_file_ext, l_allow_file_upload
          from fnd_mime_types m
          where lower(mime_type) = lower(x_mime_type)
          and lower(file_ext) = lower(x_file_ext);
Line: 105

          select decode(x_cp_format_code,fnd_file_mime_types_pkg.null_char,null,null,m.cp_format_code,x_cp_format_code),
                 decode(x_ctx_format_code,fnd_file_mime_types_pkg.null_char,null,null,m.ctx_format_code,x_ctx_format_code),
                 decode(x_file_ext,fnd_file_mime_types_pkg.null_char,null,null,m.file_ext,x_file_ext),
                 decode(x_allow_file_upload,fnd_file_mime_types_pkg.null_char,null,null,m.allow_file_upload,x_allow_file_upload)
          into l_cp_format_code, l_ctx_format_code, l_file_ext, l_allow_file_upload
          from fnd_mime_types m
          where lower(mime_type) = lower(x_mime_type);
Line: 115

          update fnd_mime_types
          set    cp_format_code = l_cp_format_code,
                 ctx_format_code = l_ctx_format_code,
                 file_ext = l_file_ext,
                 allow_file_upload = l_allow_file_upload
          where mime_type = x_mime_type;
Line: 122

END UPDATE_ROW;
Line: 125

PROCEDURE DELETE_ROW (X_MIME_TYPE in VARCHAR2,
                      X_FILE_EXT in VARCHAR2) IS

BEGIN
        delete from fnd_mime_types
        where lower(mime_type) like lower(x_mime_type)
        and lower(file_ext) like lower(x_file_ext);
Line: 137

END DELETE_ROW;
Line: 142

    UPDATE FND_MIME_TYPES
    SET FILE_EXT = X_FILE_EXT
    WHERE lower(MIME_TYPE) like lower(X_MIME_TYPE);
Line: 151

    UPDATE FND_MIME_TYPES
    SET ALLOW_FILE_UPLOAD = X_ALLOW_FILE_UPLOAD
    WHERE lower(FILE_EXT) = lower(X_FILE_EXT);