49: l_col_id number;
50: begin
51:
52: select column_id into l_col_id
53: from fnd_columns
54: where application_id = p_appl_id
55: and table_id = p_table_id
56: and column_name = p_col_name;
57:
422: ' Column_name='||p_col_name);
423:
424: end if;
425: --
426: -- insert into FND_COLUMNS
427: --
428: insert into fnd_columns
429: (APPLICATION_ID,
430: TABLE_ID,
424: end if;
425: --
426: -- insert into FND_COLUMNS
427: --
428: insert into fnd_columns
429: (APPLICATION_ID,
430: TABLE_ID,
431: COLUMN_ID,
432: COLUMN_NAME,
445: PRECISION,
446: SCALE)
447: select p_appl_id,
448: p_table_id,
449: fnd_columns_s.nextval,
450: upper(p_col_name),
451: upper(p_col_name),
452: p_col_seq,
453: to_date('01-01-1990', 'DD-MM-YYYY'),
462: 'N',
463: p_precision,
464: p_scale
465: from sys.dual
466: where not exists (select 'x' from fnd_columns
467: where application_id = p_appl_id
468: and table_id = p_table_id
469: and column_name = upper(p_col_name));
470:
498:
499: --
500: -- delete all columns
501: --
502: delete from fnd_columns
503: where application_id = p_appl_id and table_id = p_table_id;
504:
505: delete from fnd_tables
506: where application_id = p_appl_id and table_id = p_table_id;
538:
539: --
540: -- delete the given column
541: --
542: delete from fnd_columns
543: where application_id = p_appl_id
544: and table_id = p_table_id
545: and column_name = upper(p_col_name);
546: