How to add column to compressed table

Hi gurus,
Can any one help me how to add a column to compressed tables
Thanks in advance

The only difference is if added column has default value. In that case:
SQL> create table tbl(id number,val varchar2(10))
  2  /
Table created.
SQL> insert into tbl
  2  select level,lpad('X',10,'X')
  3  from dual
  4  connect by level <= 100000
  5  /
100000 rows created.
SQL> select bytes
  2  from user_segments
  3  where segment_name = 'TBL'
  4  /
     BYTES
   3145728
SQL> alter table tbl move compress
  2  /
Table altered.
SQL> select bytes
  2  from user_segments
  3  where segment_name = 'TBL'
  4  /
     BYTES
   2097152
SQL> alter table tbl add name varchar2(5) default 'NONE'
  2  /
alter table tbl add name varchar2(5) default 'NONE'
ERROR at line 1:
ORA-39726: unsupported add/drop column operation on compressed tables
SQL> alter table tbl add name varchar2(5)
  2  /
Table altered.
SQL> update tbl set name = 'NONE'
  2  /
100000 rows updated.
SQL> commit
  2  /
Commit complete.
SQL> select bytes
  2  from user_segments
  3  where segment_name = 'TBL'
  4  /
     BYTES
   7340032
SQL> select compression from user_tables where table_name = 'TBL'
  2  /
COMPRESS
ENABLED
SQL> alter table tbl move compress
  2  /
Table altered.
SQL> select bytes
  2  from user_segments
  3  where segment_name = 'TBL'
  4  /
     BYTES
   2097152
SQL> SY.

Similar Messages

  • How to add column comments to table

    at the time of creating the table, how to add the comments t columns.

    Hi,
    I do not see any way in which you can add comment on column while issuing create table command. You can add comment on the column only after the table is created.
    Regards
    Anurag Tibrewal.

  • How i add Columns to my table ?

    Guys, im not being able to add my columns to the table, can anyone help me ?
    Thanks!
    TableView<String> tv = new TableView<>();
      tv.setVisible(true);
           TableColumn firstNameCol = new TableColumn();
           TableColumn lastNameCol = new TableColumn();
           TableColumn emailCol = new TableColumn();
           tv.getColumns().add(0,firstNameCol);

    Woah! Thanks man! it works greatly but.... Theres just 1 more issue!! i read all the javaDoc and asked help to a friend but we were unable to find a solution, also, im using the "Introduction to javaFX 2 book".
    Im sorry to keep troubling you guys, but it seems javaFX isnt taking off here, and i sometimes think im one of the first in Brasil to starting learning it.
    They teach java in my College, but i think javaFX is a way better "swing/interface" than the one in java. Anyway , the problem im having is : I need get the data from a db , no problem with that, but how can i insert that data? I tried several solutions but none worked.
    Can you help me one more time :D ? Please!!
    thanks a lot guys
    Anyway, heres what the classes are :
    Main Class :
    package voosparaweb;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    * @author André Vinícius Lopes
    public class Voos {
        public static void main(String args[])
         VoosParaWeb v1 = new VoosParaWeb();
         v1.main(args);
         //The Code Below doesnt  work
         v1.testingDataSetTable("1","13:00","Roma");
    }voosParaWeb Class
    package voosparaweb;
    import javafx.application.Application;
    import javafx.collections.ObservableList;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.control.TableColumn;
    import javafx.scene.control.TableView;
    import javafx.scene.control.cell.PropertyValueFactory;
    import javafx.scene.layout.GridPane;
    import javafx.stage.Stage;
    * @author André
    public class VoosParaWeb extends Application {
      public TableView<Data> t1 = new TableView<Data>();
      public static void main(String[] args) {
        launch(args);
      @Override
      public void start(Stage primaryStage) {
        Group root = new Group();
        GridPane gp = new GridPane();
        root.getChildren().add(gp);
        Scene scene = new Scene(root, 640, 480);
        t1 = tvset();
        setDataTable();
        t1.setVisible(true);
        gp.add(t1, 1, 1);
         //The Code Below work
        // v1.testingDataSetTable("1","13:00","Roma");
        primaryStage.setTitle("Terminals Panel");
        primaryStage.setScene(scene);
        primaryStage.show();
      public TableView<Data> tvset()
        String Person;
        ObservableList<VoosParaWeb> data;
        TableView<Data> tv = new TableView<Data>();
        tv.setVisible(true);
        TableColumn<Data, String> idTc = new TableColumn<Data, String>("ID#");
        idTc.setCellValueFactory(new PropertyValueFactory("id"));
        TableColumn<Data, String> timeTc = new TableColumn<Data, String>("Time");
        timeTc.setCellValueFactory(new PropertyValueFactory("time"));
        TableColumn<Data, String> destinyTc = new TableColumn<Data, String>("Destiny");
        destinyTc.setCellValueFactory(new PropertyValueFactory("destiny"));
        TableColumn flightTc = new TableColumn("Flight");
        TableColumn counterTc = new TableColumn("Counter");
        TableColumn boardingTc = new TableColumn("Boarding");
        TableColumn gateTc = new TableColumn("Gate");
        TableColumn statusTc = new TableColumn("Status");
        tv.getColumns().add(idTc);
        tv.getColumns().add(timeTc);
        tv.getColumns().add(destinyTc);
        tv.getColumns().add(flightTc);
        tv.getColumns().add(counterTc);
        tv.getColumns().add(boardingTc);
        tv.getColumns().add(gateTc);
        tv.getColumns().add(statusTc);
        return tv;
      public void setDataTable()
        t1.getItems().add(new Data("1", "1:15", "Amsterdam"));
      public void testingDataSetTable(String i,String time,String dest)
        t1.getItems().add(new Data(i,time,dest));
        t1.setVisible(true);
      public static class Data {
        private String id;
        private String time;
        private String destiny;
        public Data()
        public Data(String id, String time, String destiny) {
          this.id = id;
          this.time = time;
          this.destiny = destiny;
        public String getId() {
          return id;
        public String getTime() {
          return time;
        public String getDestiny() {
          return destiny;
    }

  • How to add columns for existing table dynamically?

    Hi,
    I created table structure only. I want to add columns for this existing  table. Columns are not fixed, according to the  user choice i  need to write code.
    Plz give me reply asap.
    Thanks
    Shirisha

    Hi Shirisha,
    I think the following code snippet will help you.
    int l_no_cols = 0;
    //Get the number of columns in this variable, something like the following
    //l_no_cols = wdContext().currentContextElement().get<Context_attribute_name>;
    IWDTable l_tab;
    IWDTransparentContainer l_tbl_cont = (IWDTransparentContainer)view.getElement("TableDataCont");//ID of Container
    l_tab = (IWDTable)view.getElement("TableData");//ID of Table
    l_tab.setVisible(WDVisibility.VISIBLE);
    l_tab.bindDataSource(wdContext.nodeTable_Data().getNodeInfo());
    for(int a = 1; a <=l_no_cols; a++)
    //Creating the column
    IWDTableColumn l_tab_col = (IWDTableColumn)view.createElement(IWDTableColumn.class,"COL"+a);
    //Creating Caption for Column Header
    IWDCaption l_tab_cap = (IWDCaption)view.createElement(IWDCaption.class,"Caption"+a);
    l_tab_cap.setText("Col"+i);               
    l_tab_col.setHeader(l_tab_cap);
    //Creating Table Cell Editor for column
    IWDInputField l_tab_cell = (IWDInputField)view.createElement(IWDInputField.class,"CellEditor"+a);
    //creating context node attribute for the column dynamically
    wdContext.nodeTable_Data().getNodeInfo().addAttribute("Col"+i,"com.sap.dictionary.String");
    l_tab_cell.bindValue(wdContext.nodeTable_Data().getNodeInfo().getAttribute("Col"+i));
    l_tab_col.setTableCellEditor(l_tab_cell);
    l_tab.addColumn(l_tab_col);
    l_tbl_cont.addChild(l_tab);
    Regards,
    Alka

  • How to Add column with default value in compress table.

    Hi ,
    while trying to add column to compressed table with default value i am getting error.
    Even i tried no compress command on table still its giivg error that add/drop not allowed on compressed table.
    Can anyone help me in this .
    Thanks.

    Aman wrote:
    while trying to add column to compressed table with default value i am getting error.This is clearly explain in the Oracle doc :
    "+You cannot add a column with a default value to a compressed table or to a partitioned table containing any compressed partition, unless you first disable compression for the table or partition+"
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_3001.htm#sthref5163
    Nicolas.

  • How to add column to report from the same table? Gives error now

    Steps to reproduce:
    Build a report on a table with easy report, select all columns
    Add column to the table
    Edit report and add column (one has to click Show Related Tables Only: No to view the same table!)
    Report will give error as it will be build as
    SELECT ... FROM table1, table1

    AH HAAA!!!!
    And I was afraid to convert from the "SQL (Structured Query)" to "SQL". Probably because I blew up my other reports...
    Thanks!

  • How to make column headers in table in PDF report appear bold while datas in table appear regular from c# windows forms with sql server2008 using iTextSharp

    Hi my name is vishal
    For past 10 days i have been breaking my head on how to make column headers in table appear bold while datas in table appear regular from c# windows forms with sql server2008 using iTextSharp.
    Given below is my code in c# on how i export datas from different tables in sql server to PDF report using iTextSharp:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using System.Data.SqlClient;
    using iTextSharp.text;
    using iTextSharp.text.pdf;
    using System.Diagnostics;
    using System.IO;
    namespace DRRS_CSharp
    public partial class frmPDF : Form
    public frmPDF()
    InitializeComponent();
    private void button1_Click(object sender, EventArgs e)
    Document doc = new Document(PageSize.A4.Rotate());
    var writer = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
    doc.SetMargins(50, 50, 50, 50);
    doc.SetPageSize(new iTextSharp.text.Rectangle(iTextSharp.text.PageSize.LETTER.Width, iTextSharp.text.PageSize.LETTER.Height));
    doc.Open();
    PdfPTable table = new PdfPTable(6);
    table.TotalWidth =530f;
    table.LockedWidth = true;
    PdfPCell cell = new PdfPCell(new Phrase("Institute/Hospital:AIIMS,NEW DELHI", FontFactory.GetFont("Arial", 14, iTextSharp.text.Font.BOLD, BaseColor.BLACK)));
    cell.Colspan = 6;
    cell.HorizontalAlignment = 0;
    table.AddCell(cell);
    Paragraph para=new Paragraph("DCS Clinical Record-Assigned Dialyzer",FontFactory.GetFont("Arial",16,iTextSharp.text.Font.BOLD,BaseColor.BLACK));
    para.Alignment = Element.ALIGN_CENTER;
    iTextSharp.text.Image png = iTextSharp.text.Image.GetInstance("logo5.png");
    png.ScaleToFit(105f, 105f);
    png.Alignment = Element.ALIGN_RIGHT;
    SqlConnection conn = new SqlConnection("Data Source=NPD-4\\SQLEXPRESS;Initial Catalog=DRRS;Integrated Security=true");
    SqlCommand cmd = new SqlCommand("Select d.dialyserID,r.errorCode,r.dialysis_date,pn.patient_first_name,pn.patient_last_name,d.manufacturer,d.dialyzer_size,r.start_date,r.end_date,d.packed_volume,r.bundle_vol,r.disinfectant,t.Technician_first_name,t.Technician_last_name from dialyser d,patient_name pn,reprocessor r,Techniciandetail t where pn.patient_id=d.patient_id and r.dialyzer_id=d.dialyserID and t.technician_id=r.technician_id and d.deleted_status=0 and d.closed_status=0 and pn.status=1 and r.errorCode<106 and r.reprocessor_id in (Select max(reprocessor_id) from reprocessor where dialyzer_id=d.dialyserID) order by pn.patient_first_name,pn.patient_last_name", conn);
    conn.Open();
    SqlDataReader dr;
    dr = cmd.ExecuteReader();
    table.AddCell("Reprocessing Date");
    table.AddCell("Patient Name");
    table.AddCell("Dialyzer(Manufacturer,Size)");
    table.AddCell("No.of Reuse");
    table.AddCell("Verification");
    table.AddCell("DialyzerID");
    while (dr.Read())
    table.AddCell(dr[2].ToString());
    table.AddCell(dr[3].ToString() +"_"+ dr[4].ToString());
    table.AddCell(dr[5].ToString() + "-" + dr[6].ToString());
    table.AddCell("@count".ToString());
    table.AddCell(dr[12].ToString() + "-" + dr[13].ToString());
    table.AddCell(dr[0].ToString());
    dr.Close();
    table.SpacingBefore = 15f;
    doc.Add(para);
    doc.Add(png);
    doc.Add(table);
    doc.Close();
    System.Diagnostics.Process.Start("AssignedDialyzer.pdf");
    if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.Yes)
    var writer2 = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
    else if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.No)
    this.Close();
    The above code executes well with no problem at all!
    As you can see the file to which i create and save and open my pdf report is
    AssignedDialyzer.pdf.
    The column headers of table in pdf report from c# windows forms using iTextSharp are
    "Reprocessing Date","Patient Name","Dialyzer(Manufacturer,Size)","No.of Reuse","Verification" and
    "DialyzerID".
    However the problem i am facing is after execution and opening of document is my
    column headers in table in pdf report from
    c# and datas in it all appear in bold.
    I have browsed through net regarding to solve this problem but with no success.
    What i want is my pdf report from c# should be similar to following format which i was able to accomplish in vb6,adodb with MS access using iTextSharp.:
    Given below is report which i have achieved from vb6,adodb with MS access using iTextSharp
    I know that there has to be another way to solve my problem.I have browsed many articles in net regarding exporting sql datas to above format but with no success!
    Is there is any another way to solve to my problem on exporting sql datas from c# windows forms using iTextSharp to above format given in the picture/image above?!
    If so Then Can anyone tell me what modifications must i do in my c# code given above so that my pdf report from c# windows forms using iTextSharp will look similar to image/picture(pdf report) which i was able to accomplish from
    vb6,adodb with ms access using iTextSharp?
    I have approached Sound Forge.Net for help but with no success.
    I hope anyone/someone truly understands what i am trying to ask!
    I know i have to do lot of modifications in my c# code to achieve this level of perfection but i dont know how to do it.
    Can anyone help me please! Any help/guidance in solving this problem would be greatly appreciated.
    I hope i get a reply in terms of solving this problem.
    vishal

    Hi,
    About iTextSharp component issue , I think this case is off-topic in here.
    I suggest you consulting to compenent provider.
    http://sourceforge.net/projects/itextsharp/
    Regards,
    Marvin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to add column dynamically based on user input in oracle?

    **how to add column dynamically based on user input in oracle?**
    I am generating monthly report based on from_date to to_date below is my requirement sample table
    EMPLOYEE_CODE| Name | CL_TAKEN_DATE | CL_BALANCE | 01-OCT-12 | 02-OCT-12 | 03-OCT-12
    100001.............John...........02-OCT-12...............6
    100002.............chris...........01-OCT-12...............4
    Based on user input, that is, if user need the report from 01-OCT-12 TO 03-OCT-12, i need to add that dates as column in my table, like 01-OCT-12 | 02-OCT-12 | 03-OCT-12....
    below is my code
    create or replace
    procedure MONTHLY_LVE_NEW_REPORT_demo
    L_BUSINESS_UNIT IN SSHRMS_LEAVE_REQUEST_TRN.BUSINESS_UNIT%TYPE,
    --L_LEAVE_TYPE_CODE           IN SSHRMS_LEAVE_REQUEST_TRN.LEAVE_TYPE_CODE%TYPE,
    L_DEPARTMENT_CODE IN VARCHAR2,
    --L_MONTH                    IN SSHRMS_LEAVE_REQUEST_TRN.LVE_FROM_DATE%TYPE,
    L_FROM_DATE IN SSHRMS_LEAVE_REQUEST_TRN.LVE_FROM_DATE%TYPE,
    L_TO_DATE in SSHRMS_LEAVE_REQUEST_TRN.LVE_TO_DATE%type,
    MONTHRPT_CURSOR OUT SYS_REFCURSOR
    AS
    O_MONTHRPT_CURSOR_RPT clob;
    v_return_msg clob;
    BEGIN
    IF (L_BUSINESS_UNIT IS NOT NULL
    AND L_FROM_DATE IS NOT NULL
    and L_TO_DATE is not null
    -- AND L_DEPARTMENT_CODE IS NOT NULL
    THEN
    OPEN MONTHRPT_CURSOR FOR
    select EMPLOYEE_CODE, EMPLOYEE_NAME AS NAME, DEPARTMENT_CODE AS DEPARTMENT,DEPARTMENT_DESC, CREATED_DATE,
    NVL(WM_CONCAT(CL_RANGE),'') as CL_TAKEN_DATE,
    case when NVL(SUM(CL2),0)<0 then 0 else (NVL(SUM(CL2),0)) end as CL_BALANCE,
    from
    SELECT DISTINCT a.employee_code,
    a.EMPLOYEE_FIRST_NAME || ' ' || a.EMPLOYEE_LAST_NAME as EMPLOYEE_NAME,
    a.DEPARTMENT_CODE,
    a.DEPARTMENT_DESC,
    B.LEAVE_TYPE_CODE,
    B.LVE_UNITS_APPLIED,
    B.CREATED_DATE as CREATED_DATE,
    DECODE(b.leave_type_code,'CL',SSHRMS_LVE_BUSINESSDAY(L_BUSINESS_UNIT,to_char(b.lve_from_date,'mm/dd/yyyy'), to_char(b.lve_to_date,'mm/dd/yyyy'))) CL_RANGE,
    DECODE(B.LEAVE_TYPE_CODE,'CL',B.LVE_UNITS_APPLIED)CL1,
    b.status
    from SSHRMS_EMPLOYEE_DATA a
    join
    SSHRMS_LEAVE_BALANCE C
    on a.EMPLOYEE_CODE = C.EMPLOYEE_CODE
    and C.STATUS = 'Y'
    left join
    SSHRMS_LEAVE_REQUEST_TRN B
    on
    B.EMPLOYEE_CODE=C.EMPLOYEE_CODE
    and c.EMPLOYEE_CODE = b.EMPLOYEE_CODE
    and B.LEAVE_TYPE_CODE = C.LEAVE_TYPE_CODE
    and B.STATUS in ('A','P','C')
    and (B.LVE_FROM_DATE >= TO_DATE(L_FROM_DATE, 'DD/MON/RRRR')
    and B.LVE_TO_DATE <= TO_DATE(L_TO_DATE, 'DD/MON/RRRR'))
    join
    SSHRMS_LEAVE_REQUEST_TRN D
    on a.EMPLOYEE_CODE = D.EMPLOYEE_CODE
    and D.LEAVE_TYPE_CODE in ('CL')
    AND D.LEAVE_TYPE_CODE IS NOT NULL
    group by EMPLOYEE_CODE, EMPLOYEE_NAME, DEPARTMENT_CODE, DEPARTMENT_DESC, CREATED_DATE
    else
    v_return_msg:='Field should not be empty';
    end if;
    END;
    my code actual output
    EMPLOYEE_CODE| Name | CL_TAKEN_DATE | CL_BALANCE
    100001....................John............02-OCT-12.................6
    100001....................chris...........01-OCT-12.................4
    how to add column dynamically based on from_date to to_date?
    Thanks and Regards,
    Chris Jerome.

    You cannot add columns dynamically. But you can define a maximum number of numbers and then hide unused columns in your form useing SET_ITEM_PROPERTY(..,VISIBLE, PROPERTY_FALSE);

  • Urgent - How to add buttons to a Table

    How to add buttons to a Table and enable them for Mouse Listeners/ Action Listeners

    extends the defaultcellrenderer make it return a Jbutton as the component to draw.
    class OverCellRendererClass extends DefaultTableCellRenderer {
    public Component getTableCellRendererComponent(JTable table,
    Object value,
    boolean isSelected,
    boolean hasFocus,
    int row,
    int column) {
    //put your stuff here to make or get a button
    return myButton;
    Use something like this to set the renderer for the column :
    tb.getColumnModel().getColumn(4).setCellRenderer(new YourCellRendererClass());

  • How to add Column to Adobe flex mx:DataGrid in mxml and/or actionsctpt?

    I have simple mxml code
    <mx:DataGrid id="DGG"
                 editable="true">
        <mx:dataProvider>
            <mx:Object scheduledDate="4/1/2006"/>
        </mx:dataProvider>
    </mx:DataGrid>
    <mx:Button id="SetBut"
               label="Set Array as Data Provider"
               click="SetDP(); AddBut.visible = true;"
               x="100.5"
               y="164"
               width="211"/>
    <mx:Button id="AddBut"
               label="Add a column!"
               click="AddCol();"
               x="100.5"
               y="194"
               width="211"
               visible="false"/>
    <mx:Script>
        <![CDATA[
            import mx.controls.dataGridClasses.DataGridColumn;
            import mx.collections.ArrayCollection;
            [Bindable]
            public var MyAC:ArrayCollection=new ArrayCollection([{scheduledDate: "4/1/2006", homeTeam: "Chester Bucks"}]);
            public function SetDP():void
                DGG.dataProvider=MyAC
            public function AddCol():void
                MyAC.addItem({scheduledDate: "4/5/2007", homeTeam: "Long Valley Hitters", Umpire: "Amanda Hugenkis"});
                DGG.columns.push(new DataGridColumn("Umpire"));
        ]]>
    </mx:Script>
    I want to add rows to my table datagrid how to do such thing?
    How to add Column to Adobe flex mx:DataGrid in mxml and/or actionsctpt?
    (You can put this code in Flash or AIR app - it will compile with no errors, but will not add any columns=( )

    Change this:
                 public function SetDP():void
                    DGG.dataProvider=MyAC
                    MyAC.addItem({scheduledDate: "4/5/2007", homeTeam: "Long Valley Hitters", Umpire: "Amanda Hugenkis"});
                public function AddCol():void
                    var dgc:DataGridColumn = new DataGridColumn("Umpire");
                    var ca:Array = DGG.columns;
                    ca.push(dgc);
                    DGG.columns = ca;
    Dany

  • ORA-22856: cannot add columns to object tables

    Oracle 9i
    ==========
    I tried to alter a table using a simple script.
    ALTER TABLE tablename ADD col VARCHAR(50);
    And it gave me the error: -
    ORA-22856: cannot add columns to object tables
    Can someone give me some direction on how to resolve this? The script executes fine on a test env.
    Thanks in advance

    Thanks for replying...
    exit     Null? Type
    BUS     NUMBER
    REP     VARCHAR2(60)
    COS     NUMBER
    REP     VARCHAR2(50)
    ACC     NUMBER
    ADJ     VARCHAR2(2000)
    BAS     NUMBER
    BIL     VARCHAR2(360)
    BIL     VARCHAR2(50)
    BIL     VARCHAR2(3)
    BIL     VARCHAR2(50)
    BLP     VARCHAR2(240)
    BLP     NUMBER
    BOO     DATE
    COM     NUMBER
    COM     NUMBER
    COM     NUMBER(15)
    COM     NUMBER(15)
    COM     VARCHAR2(4000)
    COM     VARCHAR2(30)
    CUR     NUMBER
    CUS     VARCHAR2(240)
    DEA     VARCHAR2(240)
    EVE     VARCHAR2(240)
    HEA     VARCHAR2(240)
    HEA     VARCHAR2(240)
    HEA     VARCHAR2(240)
    HEA     VARCHAR2(240)
    INC     VARCHAR2(30)
    INV     DATE
    MAN     VARCHAR2(360)
    ORD     NUMBER
    ORD     VARCHAR2(240)
    PAY     VARCHAR2(240)
    PAY     NUMBER
    HEL     NUMBER
    PEO     VARCHAR2(150)
    PER     NUMBER
    PER     VARCHAR2(30)
    PER     NUMBER(15)
    PRO     VARCHAR2(240)
    PRO     VARCHAR2(240)
    QUA     NUMBER(15)
    QUO     NUMBER
    QUO     DATE
    QUO     DATE
    QUO     VARCHAR2(80)
    RED     VARCHAR2(240)
    REP     VARCHAR2(360)
    REP     VARCHAR2(30)
    REP     VARCHAR2(30)
    REP     VARCHAR2(150)
    REP     VARCHAR2(3)
    REP     VARCHAR2(150)
    REP     VARCHAR2(50)
    ROL     VARCHAR2(60)
    SHI     VARCHAR2(360)
    SPL     VARCHAR2(240)
    STA     DATE
    TER     DATE
    TOT     VARCHAR2(240)
    TRX     NUMBER
    TRX     VARCHAR2(240)
    TRX     VARCHAR2(20)
    TRX     VARCHAR2(30)
    WAI     VARCHAR2(240)
    YEA     NUMBER
    MAN     VARCHAR2(30)
    BUF     NUMBER
    BUF     VARCHAR2(60)
    EMC     NUMBER
    EMC     VARCHAR2(60)
    INT     NUMBER
    INT     VARCHAR2(60)
    SUP     NUMBER
    SUP     VARCHAR2(60)
    BRM     NUMBER
    BRM     VARCHAR2(60)
    SUP     NUMBER
    SUP     VARCHAR2(60)
    REP     NUMBER
    REP     VARCHAR2(60)
    DIV     NUMBER
    DIV     VARCHAR2(60)
    SUP     NUMBER
    SUP     VARCHAR2(60)
    REG     NUMBER
    REG     VARCHAR2(60)
    SUP     NUMBER
    SUP     VARCHAR2(60)
    ARE     NUMBER
    ARE     VARCHAR2(60)
    DIS     NUMBER
    DIS     VARCHAR2(60)
    ROL     VARCHAR2(240)
    ACC     NUMBER
    BON     NUMBER
    COM     VARCHAR2(240)
    COM     VARCHAR2(240)
    REP     NUMBER
    BIL     NUMBER
    BAS     NUMBER
    TOT     NUMBER
    TOT     NUMBER
    OVE     NUMBER
    BLP     NUMBER
    QUO     VARCHAR2(30)
    FN_     NUMBER
    FN_     VARCHAR2(10)
    SAL     NUMBER
    RES     NUMBER
    CRE     NUMBER
    MAN     VARCHAR2(100)
    PER     NUMBER
    PLA     NUMBER
    PLA     NUMBER
    REV     VARCHAR2(30)
    REP     VARCHAR2(150)
    OU_     NUMBER
    OU_     NUMBER
    EXC     VARCHAR2(1)
    MAN     NUMBER
    INV     NUMBER
    REP     NUMBER
    UPL     VARCHAR2(1)
    COM     NUMBER
    SEQ     NUMBER
    QUO     NUMBER
    PRO     VARCHAR2(10)
    PRO     NUMBER
    PRO     NUMBER
    BI_     NUMBER
    CUR     NUMBER
    YTD     NUMBER
    PAY     NUMBER
    PAY     DATE
    PAY     VARCHAR2(1000)
    PAY     VARCHAR2(80)
    PAI     VARCHAR2(1)
    HOL     VARCHAR2(1)
    SRP     NUMBER
    WAI     VARCHAR2(1)
    WAI     VARCHAR2(1)
    GBK     VARCHAR2(10)
    TRX     DATE
    PAY     NUMBER(15)
    FIX     NUMBER
    TER     DATE
    ADJ     VARCHAR2(240)
    PAY     NUMBER
    PRO     DATE
    OIC     DATE
    OIC     NUMBER
    OIC     VARCHAR2(30)
    OIC     NUMBER
    HEL     NUMBER
    COM     NUMBER
    TRA     NUMBER
    HDR     VARCHAR2(30)
    LIN     VARCHAR2(30)
    LIN     DATE
    SRC     DATE
    EM_     DATE
    EM_     DATE
    ORD     VARCHAR2(30)
    REP     VARCHAR2(150)
    BIL     VARCHAR2(300)
    PER     VARCHAR2(240)
    Excuse the incomplete column names. All datatypes are basic ones and there are no constraints defined on any of the columns (dw env). The table is partitioned.

  • How to encrypt column of some table with the single method  on oracle7/814?

    How to encrypt column of some table with the single method on oracle7/814?

    How to encrypt column of some table with the single method on oracle7/814?

  • How to encrypt column of some table with the single method ?

    How to encrypt column of some table with the single method ?

    How to encrypt column of some table with the single
    method ?How to encrypt column of some table with the single
    method ?
    using dbms_crypto package
    Assumption: TE is a user in oracle 10g
    we have a table need encrypt a column, this column SYSDBA can not look at, it's credit card number.
    tha table is
    SQL> desc TE.temp_sales
    Name Null? Type
    CUST_CREDIT_ID NOT NULL NUMBER
    CARD_TYPE VARCHAR2(10)
    CARD_NUMBER NUMBER
    EXPIRY_DATE DATE
    CUST_ID NUMBER
    1. grant execute on dbms_crypto to te;
    2. Create a table with a encrypted columns
    SQL> CREATE TABLE te.customer_credit_info(
    2 cust_credit_id number
    3      CONSTRAINT pk_te_cust_cred PRIMARY KEY
    4      USING INDEX TABLESPACE indx
    5      enable validate,
    6 card_type varchar2(10)
    7      constraint te_cust_cred_type_chk check ( upper(card_type) in ('DINERS','AMEX','VISA','MC') ),
    8 card_number blob,
    9 expiry_date date,
    10 cust_id number
    11      constraint fk_te_cust_credit_to_cust references te.customer(cust_id) deferrable
    12 )
    13 storage (initial 50k next 50k pctincrease 0 minextents 1 maxextents 50)
    14 tablespace userdata_Lm;
    Table created.
    SQL> CREATE SEQUENCE te.customers_cred_info_id
    2 START WITH 1
    3 INCREMENT BY 1
    4 NOCACHE
    5 NOCYCLE;
    Sequence created.
    Note: Credit card number is blob data type. It will be encrypted.
    3. Loading data encrypt the credit card number
    truncate table TE.customer_credit_info;
    DECLARE
    input_string VARCHAR2(16) := '';
    raw_input RAW(128) := UTL_RAW.CAST_TO_RAW(CONVERT(input_string,'AL32UTF8','US7ASCII'));
    key_string VARCHAR2(8) := 'AsDf!2#4';
    raw_key RAW(128) := UTL_RAW.CAST_TO_RAW(CONVERT(key_string,'AL32UTF8','US7ASCII'));
    encrypted_raw RAW(2048);
    encrypted_string VARCHAR2(2048);
    BEGIN
    for cred_record in (select upper(CREDIT_CARD) as CREDIT_CARD,
    CREDIT_CARD_EXP_DATE,
    to_char(CREDIT_CARD_NUMBER) as CREDIT_CARD_NUMBER,
    CUST_ID
    from TE.temp_sales) loop
    dbms_output.put_line('type:' || cred_record.credit_card || 'exp_date:' || cred_record.CREDIT_CARD_EXP_DATE);
    dbms_output.put_line('number:' || cred_record.CREDIT_CARD_NUMBER);
    input_string := cred_record.CREDIT_CARD_NUMBER;
    raw_input := UTL_RAW.CAST_TO_RAW(CONVERT(input_string,'AL32UTF8','US7ASCII'));
    dbms_output.put_line('> Input String: ' || CONVERT(UTL_RAW.CAST_TO_VARCHAR2(raw_input),'US7ASCII','AL32UTF8'));
    encrypted_raw := dbms_crypto.Encrypt(
    src => raw_input,
    typ => DBMS_CRYPTO.DES_CBC_PKCS5,
    key => raw_key);
    encrypted_string := rawtohex(UTL_RAW.CAST_TO_RAW(encrypted_raw)) ;
    dbms_output.put_line('> Encrypted hex value : ' || encrypted_string );
    insert into TE.customer_credit_info values
    (TE.customers_cred_info_id.nextval,
    cred_record.credit_card,
    encrypted_raw,
    cred_record.CREDIT_CARD_EXP_DATE,
    cred_record.CUST_ID);
    end loop;
    commit;
    end;
    4. Check credit card number script
    DECLARE
    input_string VARCHAR2(16) := '';
    raw_input RAW(128) := UTL_RAW.CAST_TO_RAW(CONVERT(input_string,'AL32UTF8','US7ASCII'));
    key_string VARCHAR2(8) := 'AsDf!2#4';
    raw_key RAW(128) := UTL_RAW.CAST_TO_RAW(CONVERT(key_string,'AL32UTF8','US7ASCII'));
    encrypted_raw RAW(2048);
    encrypted_string VARCHAR2(2048);
    decrypted_raw RAW(2048);
    decrypted_string VARCHAR2(2048);
    cursor cursor_cust_cred is select CUST_CREDIT_ID, CARD_TYPE, CARD_NUMBER, EXPIRY_DATE, CUST_ID
    from TE.customer_credit_info order by CUST_CREDIT_ID;
    v_id customer_credit_info.CUST_CREDIT_ID%type;
    v_type customer_credit_info.CARD_TYPE%type;
    v_EXPIRY_DATE customer_credit_info.EXPIRY_DATE%type;
    v_CUST_ID customer_credit_info.CUST_ID%type;
    BEGIN
    dbms_output.put_line('ID Type Number Expiry_date cust_id');
    dbms_output.put_line('-----------------------------------------------------');
    open cursor_cust_cred;
    loop
         fetch cursor_cust_cred into v_id, v_type, encrypted_raw, v_expiry_date, v_cust_id;
    exit when cursor_cust_cred%notfound;
    decrypted_raw := dbms_crypto.Decrypt(
    src => encrypted_raw,
    typ => DBMS_CRYPTO.DES_CBC_PKCS5,
    key => raw_key);
    decrypted_string := CONVERT(UTL_RAW.CAST_TO_VARCHAR2(decrypted_raw),'US7ASCII','AL32UTF8');
    dbms_output.put_line(V_ID ||' ' ||
    V_TYPE ||' ' ||
    decrypted_string || ' ' ||
    v_EXPIRY_DATE || ' ' ||
    v_CUST_ID);
    end loop;
    close cursor_cust_cred;
    commit;
    end;
    /

  • How to add empty rows in table in smart form

    how to add empty rows in table in smart form?
    plz help me regarding this
    send me ur queries to [email protected]

    You will need to add some extra rows to the internal table that your table is displaying.  Use a program node to append additional rows with a key but no argument.
    Alternaively a template may me more suitable for your requirement than a table.
    Finally, please do not include you e-mail address in your question.  Your question and the answers provided to it are for the benefit of everyone in the Community.
    Regards,
    Nick

  • How to rename column name of table?

    Hello...
    How to rename column name of table?
    The column have data.
    Thanks.
    Martonio.

    The following should work in 9i release 2 and above.
    SQL> create table mytable(col1 varchar2(2),
      2  col2 date);
    Table created.
    SQL> insert into mytable values('t1',sysdate);
    1 row created.
    SQL> select * from mytable;
    CO COL2
    t1 30-NOV-04
    1 row selected.
    SQL> desc mytable
    Name                                      Null?    Type
    COL1                                               VARCHAR2(2)
    COL2                                               DATE
    SQL> alter table mytable rename column col2 to mydate;
    Table altered.
    SQL> desc mytable
    Name                                      Null?    Type
    COL1                                               VARCHAR2(2)
    MYDATE                                             DATE
    SQL> select * from mytable;
    CO MYDATE
    t1 30-NOV-04
    1 row selected.
    SQL> disconnect
    Disconnected from Oracle9i Enterprise Edition Release 9.2.0.3.0 - 64bit Production
    With the Partitioning option
    JServer Release 9.2.0.3.0 - Productionhttp://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/wnsql.htm#972698

Maybe you are looking for

  • Feedback app says I need to be logged in (Build 9879)

    After the 9879 Build update when I open up the Feedback app it says; To use Windows Feedback, you must be registered with the Windows Insider Preview Programme , and connected to the Internet the first time you run the feedback app'. I'm connected

  • Cups 8.6.4 on hp hardware - unsupported HW detected

    hi i am trying to setup a trial install of cups i have an HP DL380G5 with 1 quadcore xenon l5420 2.5ghz with 4gb of ram and 2x 146gb HD according to this table http://www.cisco.com/en/US/prod/collateral/voicesw/ps6790/ps5748/ps378/product_solution_ov

  • Problem in Connecting IIOP in 8i

    while deploying an EJB to Oracle8i through JDeveloper it shows the connection failed .. what to do more the SID , PORT and Host name is correct . Any modification to be done on the server side or the client machine !! Is there any way to check whethe

  • Why is Roland USB Memory No Longer Readable?

    I formatted the USB on the Roland 700NX, plugged it into my 2013 iMac with OS 10.10 (Yosemite), and I get the error "The disk you inserted was not readable by this computer". The drive doesn't mount. What am I doing wrong? I'm not sure if this has ev

  • Enabling archive log using init.ora file

    Hi I want to convert my database in archive mode using init.ora file. so what entries i need to do in it. Plz send me some samples . thanks