How to select all the colomns_names from a table, with their datatypes ..

hi :)
i would like to know, how to select in SQL all the columns names from a table with their datatypes so that i get something like this :
Table 1 : table_name
the column ID has the Datatype NUMBER
the column name has the Datatype Varchar2
Table 2 : table_name
the column check has the Datatype NUMBER
the column air has the Datatype Varchar2
and that has to be for all the tables that i own ! ..
P. S : i m trying to do this with java, so it s would be enough if you just tell me how to select all the tables_names with all their colums_names and with all their datatypes ! ..
thank you :)
i ve heard it can be done with USER_TABLES .. but i have no idea how :( ..
Edited by: user8865125 on 17.05.2011 12:22

Hi,
The data dictionary view USER_TAB_COLUMNS has one row for every column in every table in your schema. The columns TABLE_NAME, COLUMN_NAME and DATA_TYPE have all the information you need.
Another data dictionary view, USER_TABLES, may be useful, too. It has one row pre table.

Similar Messages

  • Issue in retrieving all the records from ADF Table with multiple row

    Hi,
    As per my requirement, I need to fill the table with multi selected LOV values and when user clicks on commit, I need to save them to database.
    I am using ADF 11g, Multi select table. Using the below ADD method, I am able to add the records but if user clicks on cancel, I need to remove those from view and clear the table as well.
    But the Issue I am facing is, in my cancel method, always I am getting half of the records. Lets assume table contains 100 records but in my cancel method, I am getting only 50 records.
    Please let me know what is the issue in my source code.
    ADD Method:
    public void insertRecInCMProcessParamVal(String commType, String processType, Number seqNumber){       
    try{
    Row row = this.getCmProcessParamValueView1().createRow();
    row.setAttribute("ParamValue7", commType);
    row.setAttribute("ProcessType", processType);
    row.setAttribute("CreationDate", new Date());
    row.setAttribute("CreatedBy", uid);
    row.setAttribute("ParamValueSeqNum", seqNumber);
    row.setAttribute("ProcessedFlag", "N");
    this.getCmProcessParamValueView1().insertRow(row);
    }catch(Exception e){           
    e.printStackTrace();
    Table Code:
    <af:table value="#{bindings.CmProcessParamValueView11.collectionModel}"
    var="row"
    rows="#{bindings.CmProcessParamValueView11.rangeSize}"
    emptyText="#{bindings.CmProcessParamValueView11.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.CmProcessParamValueView11.rangeSize}"
    rowBandingInterval="1"
    selectedRowKeys="#{bindings.CmProcessParamValueView11.collectionModel.selectedRow}"
    selectionListener="#{bindings.CmProcessParamValueView11.collectionModel.makeCurrent}"
    rowSelection="multiple"
    binding="#{backingBeanScope.backing_app_RunCalcPage.t1}"
    id="t1" width="100%" inlineStyle="height:100px;" >
    <af:column sortProperty="ParamValue6"
    sortable="true"
    headerText="#{bindings.CmProcessParamValueView11.hints.ParamValue6.label}"
    id="c1" visible="false">
    <af:inputText value="#{row.bindings.ParamValue6.inputValue}"
    label="#{bindings.CmProcessParamValueView11.hints.ParamValue6.label}"
    required="#{bindings.CmProcessParamValueView11.hints.ParamValue6.mandatory}"
    columns="#{bindings.CmProcessParamValueView11.hints.ParamValue6.displayWidth}"
    maximumLength="#{bindings.CmProcessParamValueView11.hints.ParamValue6.precision}"
    shortDesc="#{bindings.CmProcessParamValueView11.hints.ParamValue6.tooltip}"
    id="it3">
    <f:validator binding="#{row.bindings.ParamValue6.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="ParamValue7"
    sortable="true"
    headerText="Comm Type"
    id="c2">
    <af:inputText value="#{row.bindings.ParamValue7.inputValue}"
    label="#{bindings.CmProcessParamValueView11.hints.ParamValue7.label}"
    required="#{bindings.CmProcessParamValueView11.hints.ParamValue7.mandatory}"
    columns="#{bindings.CmProcessParamValueView11.hints.ParamValue7.displayWidth}"
    maximumLength="#{bindings.CmProcessParamValueView11.hints.ParamValue7.precision}"
    shortDesc="#{bindings.CmProcessParamValueView11.hints.ParamValue7.tooltip}"
    id="it4">
    <f:validator binding="#{row.bindings.ParamValue7.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="ParamValue8"
    sortable="true"
    headerText="#{bindings.CmProcessParamValueView11.hints.ParamValue8.label}"
    id="c3" visible="false">
    <af:inputText value="#{row.bindings.ParamValue8.inputValue}"
    label="#{bindings.CmProcessParamValueView11.hints.ParamValue8.label}"
    required="#{bindings.CmProcessParamValueView11.hints.ParamValue8.mandatory}"
    columns="#{bindings.CmProcessParamValueView11.hints.ParamValue8.displayWidth}"
    maximumLength="#{bindings.CmProcessParamValueView11.hints.ParamValue8.precision}"
    shortDesc="#{bindings.CmProcessParamValueView11.hints.ParamValue8.tooltip}"
    id="it2">
    <f:validator binding="#{row.bindings.ParamValue8.validator}"/>
    </af:inputText>
    </af:column>
    </af:table>
    Backing Bean Code:
    DCBindingContainer dcBindings=(DCBindingContainer)getBindings();
    DCIteratorBinding dcIterator=dcBindings.findIteratorBinding("CmProcessParamValueView1Iterator");
    RowSetIterator rs = dcIterator.getRowSetIterator();
    System.out.println("In Cancel Row Count is : "+ rs.getRowCount());
    if (rs.getRowCount() > 0) {
    Row row = rs.first();
    row.refresh(Row.REFRESH_UNDO_CHANGES);
    row.remove();
    while (rs.hasNext()) {
    int count = rs.getRowCount();
    System.out.println("Count is : "+ count);
    Row row = rs.next();
    System.out.println("Row === "+ row);
    if(row != null){                   
    row.refresh(Row.REFRESH_UNDO_CHANGES);
    row.remove();
    Thanks.

    Issue resolved.
    remove selectionListener and selectedRowKeys....
    code to get all the selectedRows.
    RowSetIterator rs = dcIterator.getRowSetIterator();
    RowKeySet rks = this.t1.getSelectedRowKeys();
    Iterator rksIter = rks.iterator();
    while (rksIter.hasNext()) {
    List l = (List) rksIter.next();
    Key key = (Key)l.get(0);
    Row row = rs.getRow(key);
    Thanks.

  • How to get all the values from the dropdown menu

    How to get all the values from the dropdown menu
    I need to be able to extract all values from the dropdown menu; I know how to get all those values as a string, but I need to be able to access each item; (the value in a dropdown menu will change dynamically)
    How do I get number of item is selection dropdown?
    How do I extract a ?name? for each value, one by one?
    How do I change a selection by referring to particular index of the item in a dropdown menu?
    Here is the Path to dropdown menu that I'm trying to access (form contains number of similar dropdowns)
    RSWApp.om.GetElementByPath "window(index=0).form(id=""aspnetForm"" | action=""advancedsearch.aspx"" | index=0).formelement[SELECT](name=""ctl00$MainContent$hardwareBrand"" | id=""ctl00_MainContent_hardwareBrand"" | index=16)", element
    Message was edited by: testtest

    The findElement method allows various attributes to be used to search. Take the following two examples for the element below:
    <Select Name=ProdType ID=testProd>
    </Select>
    I can find the element based on its name or any other attribute, I just need to specify what I am looking for. To find it by name I would do the following:
    Set x = RSWApp.om.FindElement("ProdType","SELECT","Name")
    If I want to search by id I could do the following:
    Set x = RSWApp.om.FindElement("testProd","SELECT","ID")
    Usually you will use whatever is available. Since the select element has no name or ID on the Empirix home page, I used the onChange attribute. You can use any attribute as long as you specify which one you are using (last argument in these examples)
    You can use the FindElement to grab links, text boxes, etc.
    The next example grabs from a link on a page
    Home
    Set x = RSWApp.om.FindElement("Home","A","innerText")
    I hope this helps clear it up.

  • How to list all the rows from the table VBAK

    Friends ,
    How to list all the rows from the table VBAK.select query and the output list is appreciated.

    Hi,
    IF you want to select all the rows for VBAK-
    Write-
    Data:itab type table of VBAK,
           wa like line of itab.
    SELECT * FROM VBAK into table itab.
    Itab is the internal table with type VBAK.
    Loop at itab into wa.
    Write: wa-field1,
    endloop.

  • How to select all the people that are not in any equipe  ?

    Hi,
    I have a nice SQL expression that gives me as a result all the "AGENTS" (people) that are working in an EQUIPE (a team)
    select a."AGENT_ID",
    a."NOM" || ' ' || a."PRENOM" "Nom",
    c.libelle "Equipe",
    a."DATE_EMBAUCHE" "Date embauche",
    a."DATE_DEBAUCHE" "Date débauche"
    from OBSERVATOIRE."AGENT" a,
    observatoire.equipe_agents b,
    observatoire.equipe c
    where a.agent_id = b.agent_id
    and b.equipe_id = c.equipe_id
    order by nom
    Now, how to select all the agents that are NOT working in any "EQUIPE" (team) ?
    I have tried but could not succeed !
    Thank you for your kind help.
    Christian

    Christian from France wrote:
    It is not working because the table EQUIPE_AGENTS does not contains a row if the agent is not into any equipe.
    CREATE TABLE "OBSERVATOIRE"."EQUIPE_AGENTS"
    (     "EQUIPE_AGENTS_ID" NUMBER NOT NULL ENABLE,
         "EQUIPE_ID" NUMBER NOT NULL ENABLE,
         "AGENT_ID" NUMBER NOT NULL ENABLE)
    CREATE TABLE "OBSERVATOIRE"."AGENT"
    (     "AGENT_ID" NUMBER NOT NULL ENABLE,
         "GRADES_ID" NUMBER NOT NULL ENABLE,
         "NOM" VARCHAR2(50 BYTE) NOT NULL ENABLE,
         "PRENOM" VARCHAR2(50 BYTE),
         "DATE_EMBAUCHE" DATE NOT NULL ENABLE,
         "DATE_DEBAUCHE" DATE)
    The only way to "know" if an agent is not into any equipe (team) is to search into the EQUIPE_AGENTS table, and if we do not find the ID of the agent into this table, then we know that this agent is not into any EQUIPE (team).
    I don't know ho to translate this into SQL.And that's what my query does. It uses an OUTER JOIN so that a result record is returned whether or not there is a record in EQUIPE_AGENTS. And the check for EQUIPE_ID is NULL restricts the result set to those where there IS NOT a record in EQUIPE_AGENTS.
    A more traditional way would be to use NOT IN or NOT EXISTS clauses, but they can prove inefficient.

  • How to select all the text in a JTextArea??

    any1 know how to select all the text in a textarea?? just like when we press ctrl+a?? i use JTextAreaName.selectAll();doesnt work
    helt..

    worked OK for me
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    class Myprogram extends JFrame
      JTextArea TArea = new JTextArea(10,10);
      public Myprogram()
        JMenu JMenuName= new JMenu("JMenuName");
        JMenuItem  JMenuItemName=new JMenuItem("Select all");
        JMenuName.add(JMenuItemName);
        JMenuItemName.addActionListener(new SelectAllAction());
        getContentPane().add(new JScrollPane(TArea));
        JMenuBar mb = new JMenuBar();
        mb.add(JMenuName);
        setJMenuBar(mb);
        pack();
        setLocationRelativeTo(null);
        setVisible(true);
      class SelectAllAction implements ActionListener
        public void actionPerformed(ActionEvent e)
          TArea.requestFocusInWindow();
          TArea.selectAll();
      public static void main(String[] args){new Myprogram();}
    }

  • How can i convert the data from mutiple-table to the other database(MSSQL)?

    Dears,
    How can i convert the data from mutiple-table to the other database such as MS-SQL?
    I have a third party system based on MS-SQL 2000.
    Now we want to make a integration between SAP R/3(Oracle) and SQL server.
    When my user releases the purchase order in R/3, the application we coded will convert the releated data to the temp database on the SQL server.
    But i don't know which tools will help me reach the purpose.  BAPI, LSMW, IDoc... ???
    Would anybody tell me which way is better and how to do?
    Thanks a lot!
    Kevin Wang

    Hello Kevin,
    The question to use which method depend on your detail requirements. If you use BAPI, you need to find which Bapi can provide the data you want. Bapi normally use as a function called by external system. So you need to develop an external program like VB/Java to call this Bapi and move it to SQL. LSMW is use when you want to upload data from an external system to SAP. So it does not serve your requirement. Idoc can be use to export data to an external system. Again like Bapi, you need to find what Idoc can provide the data you want. However, it does not any programming from the external system. If I were you, based on your requirements, I think writing an Abap program that read the data you want and download it to NT/SQL server will be faster and easier.

  • How to fetch all the records from ztable

    Hi 
    My program is outbound program.
    According to the requirement i have to fetch all the records from ztable which are not tranmitted before to the third party and once the records are extracted and written to output file they will be marked as 'X' in the "status" field of that ztable for the next days run.
    How to fetch the records.Please suggest me.
    Thanks,
    Neelima

    HI,
    Fetch all the records whose status is equal to 'X' as whatever data is sent to third party system is marked as 'X' in status field of table after sending.
    You need to first fetch the data into internal table using the select statement where status EQ space. You get the data which is not yet transmitted to third part. And later in the program after trasmitting the data to third party modify the Records in the DB table which are transmitted with Staus eq 'X'.

  • ALV GRID-how to select all the check boxes using push button

    Hai All,
    I displayed ALV grid & every record contains one check box as first column.
    If user clicks on one push button all the check boxes needs to selected.
    Could any one tell me how to do this?
    Regards,
    Bhaskar

    Hi Bhaskar,
       Try this code :
    *" Table declarations...................................................
    TABLES :
      spfli.                              " Flight Schedule
    *" Data declarations...................................................
    Work variables                                                      *
    DATA :
      w_checkbox  TYPE c,                  " Check Box
      w_checkbox1 TYPE c,                  " Check Box
      w_lineno    LIKE sy-lilli,           " Current Line No
      w_lines     TYPE i.                  " No. Of Records in Int.Table
    Internal table to hold Flight Schedule data                         *
    DATA :
       t_spfli LIKE
      STANDARD TABLE
            OF spfli.
    Structure to hold Function Codes                                    *
    DATA :
      fs_fcode LIKE LINE OF t_fcode.
                          TOP-OF-PAGE EVENT                             *
    TOP-OF-PAGE.
      PERFORM top_of_page.
                       START-OF-SELECTION EVENT                         *
    START-OF-SELECTION.
      PERFORM fetch_spfli_data.
      SET PF-STATUS 'YMENU1'.
      DESCRIBE TABLE t_spfli LINES w_lines.
      fs_fcode = 'EXIT'.
      APPEND fs_fcode TO t_fcode.
      fs_fcode = 'SELECT'.
      APPEND fs_fcode TO t_fcode.
      fs_fcode = 'DESELECT'.
      APPEND fs_fcode TO t_fcode.
      fs_fcode = 'RETRIEVE'.
      APPEND fs_fcode TO t_fcode.
                        AT USER-COMMAND EVENT                           *
    AT USER-COMMAND.
      PERFORM user_command.
    FORM top_of_page .
      WRITE :/50 'Flight Schedule Information'(008).
      ULINE.
      FORMAT COLOR 1.
      WRITE :/10 'Carrier ID'(001),
              25 'Connection ID'(002) ,
              43 'Airport From'(003),
              59 'Airport To'(004),
              74 'Departure Time'(007),
              93 'Arrival Time'(011),
             106 space.
    ENDFORM.                               " FORM TOP_OF_PAGE
    FORM fetch_spfli_data .
      SELECT carrid                        " Carrier ID
             connid                        " Connection ID
             airpfrom                      " Airport From
             airpto                        " Airport To
             deptime                       " Departure Time
             arrtime                       " Arrival Time
        FROM spfli
        INTO CORRESPONDING FIELDS OF
       TABLE t_spfli.
      IF sy-subrc EQ 0.
        PERFORM display_spfli_data.
      ENDIF.                               " IF SY-SUBRC EQ 0
    ENDFORM.                               " FORM FETCH_SPFLI_DATA
    FORM display_spfli_data .
      SORT t_spfli BY carrid ASCENDING.
      LOOP AT t_spfli INTO spfli.
        FORMAT COLOR 2.
        WRITE :/2 w_checkbox AS CHECKBOX,
                  spfli-carrid   UNDER text-001,
                  spfli-connid   UNDER text-002,
                  spfli-airpfrom UNDER text-003,
                  spfli-airpto   UNDER text-004,
                  spfli-deptime  UNDER text-007,
                  spfli-arrtime  UNDER text-011.
      ENDLOOP.                             " LOOP AT T_SPFLI...
    ENDFORM.                               " FORM DISPLAY_SPFLI_DATA
    FORM user_command .
      CASE sy-ucomm.
        WHEN 'SELECT'.
          w_checkbox1 = 'X'.
          DO w_lines TIMES.
            w_lineno = sy-index + 3.
            READ LINE w_lineno FIELD VALUE w_checkbox.
            IF w_checkbox = '*'.
              CONTINUE.
            ELSE.
              MODIFY LINE w_lineno FIELD VALUE w_checkbox FROM w_checkbox1.
            ENDIF.                         " IF W_CHECKBOX = '*'
          ENDDO.                           " DO W_LINES TIMES.
        WHEN 'DESELECT'.
          w_checkbox1 = ' '.
          DO w_lines TIMES.
            w_lineno = sy-index + 3.
            READ LINE w_lineno.
            IF w_checkbox = '*'.
              CONTINUE.
            ELSE.
              MODIFY LINE w_lineno FIELD VALUE w_checkbox FROM w_checkbox1.
            ENDIF.                         " IF W_CHECKBOX = '*'
          ENDDO.                           " DO W_LINES TIMES.
        WHEN 'RETRIEVE'.
          w_checkbox = ' '.
          DO w_lines TIMES.
            w_lineno = sy-index + 3.
            READ LINE w_lineno FIELD VALUE w_checkbox INTO w_checkbox.
            IF w_checkbox = 'X'.
              PERFORM fetch_sflight_data.
              PERFORM display_sflight_data.
            ENDIF.                         " IF W_CHECKBOX = 'X'
          ENDDO.                           " DO W_LINES TIMES.
      ENDCASE.                             " CASE SY-UCOMM
    ENDFORM.                               " FORM USER_COMMAND
    This report gives you the SPFLI Data and places a check box in front of each record. When u click on select all button it will select all the records. And if you click on deselect all it will deselect all the records. When you are trying this maintain the pf-status 'YMENU1' and give the function codes as in the code.
    Regards,
    Swapna.

  • How to get all the values of a variable with F4 with checkboxes to select

    Dear Experts,
    After Executing a query by giving let 3 values(Out of 10 Values) to a variable.
    To give 2 more input values to the same variable(i.e.,total I wanted to give 5 inputs this time ),after refreshing the query,for that variable if I click F4, I am seeing the historical values(i.e.,3) and remaining 7 values also But with out any Check Boxes besides them to select the 2 inputs.
    In the same F4 Screen, If I click all values(an Icon at The bottom),then also Im seeing but no check Box.
    I hve tried by deleting the Delete Personalization also,but no use.
    Please tell me How to get all the values with F4 with check boxes to select ,whatever I want??
    Thanks in advance

    Take a look at the InfoObject and go to the Business Explorer tab. If the 'Query Def. Filter Value Selection' is set to 'Only Values in InfoProvider', you're only going to get the values in F4 that exist in the InfoProvider, not everything in the Master Data. This would need to be changed to the value of 'Values in Master Data Table' if you want it to show everything possible when F4 is chosen.
    Likewise, you're going to need to look at the query and go to the Advanced tab for the InfoObject. Make sure that the radio button for 'Values in Master Data Table' is selected. If not, then you should change that selection.

  • How can i get all the records from three tables(not common records)

    Hi
    I have four base tables at R/3-Side. And i need to extract them from R/3-Side.
    And i dont have any standard extractor for these tables .
    If i create a 'View' on top of these tables. Then it will give only commom records among the three tables.
    But i want all the records from three base tables (not only common).
    So how can i get the all records from three tables. please let me know
    kumar

    You can create separate 3 datasources for three tables and extract data to BW. There you can implement business login to build relation between this data.

  • I need to find out how to transfer all the music from my old IPOD to my new IPOD.  Not all of my music was purchased on ITUNES.

    I need to find out how to transfer all my music from my original IPOD nano to my new IPOD nano.   I want to keep both and not all of my music was purchased on ITUNES.  Please help!

    Your music should be in your iTunes library, that is how it gets synced to the iPod. If that music is not present in the iTunes library, you will need to get a 3rd party software for the computer to get the music off the original iPod and then move it to the iTunes library to be able to sync it to the new iPod. You can see some additional information in this tip supplied by a fellow user. Syncing to a "New" Computer or replacing a "crashed" Hard Drive

  • How to select all the rows of table control in BDC

    Hi All,
    While I am doing BDC for Transaction Code MC88, After the first screen I will get another screen with tabble control, Here I need to select all the rows of table control, I am assignng the 'X' to the first field of Table Control which is the indicator for selection.
    Here I am getting message called Indicator field is not in program and screen.
    While doing Recording I am not able to record the indicator, Please any one let me know how to record the Entire table control selection.
    Thanks in advance..

    Sorry about that lakshmi. Here is my code.
        PERFORM dynpro USING : 'X'   'SAPMMCP6'          '0105',
                               ' '   'RMCP2-MATNR'       t_matnr,
                               ' '   'RMCP2-WERKS'       t_werks,
                               ' '   'BDC_OKCODE'        '=AKTV'.
        PERFORM dynpro USING : 'X'   'SAPLMCPA'          '0707',
                               ' '   'BDC_OKCODE'        '=MRKE'.
        PERFORM dynpro USING : 'X'   'SAPLMCPA'          '0707',
                               ' '   'BDC_OKCODE'        '=GRAO

  • How to get all the values from a HashMap? thanks

    hi
    can anyone tell me how to get all the keys and their values contained in a HashMap? thanks

    thanks to u all for ur response, i gues if i need to get both keys and values, i need to use keySet() to get a set of keys first and then using each key to get value. is there any other faster way to get both of them (key and value)? thanks again

  • How to select all the frames in a document?

    i did select only particular active session.is it possible to select all the frames in a document?

    Hi vinothvijay,
    You can use below interface to select all the frames in the document.
    ISelectionManager* selMgr = Utils<ISelectionUtils>()->GetActiveSelection();
    if(selMgr)
       selMgr->SelectAll(ac,nil);
    Regards,
    Santosh K.

Maybe you are looking for

  • This page has a content security policy that prevents it from being embedded in this way

    I keep getting this warning message on random pages, including AOL Mail, and Android Central Forums, after recent Firefox updates. I can't click this message off, and it locks the entire browser. Sometimes I can X out of it, and sometimes it opens ma

  • What does 'fcode' mean?

    Hi. Could anyone help me about 'fcode'  that is in userexit SD module. I review MV45AFZZ at SE38 and am curious about it. and  what are the 'LOES' , 'FLI1', 'FLIF' and .. Please help me ex) if sy-tcode+0(4)  =  'VA01'  and    fcode+0(4)     <> 'LOES'

  • Create Directory Doesn't Work!!! (stupid computers, mumble grumble)

    Ok, so maybe I'm an ass.... but this rather simple section of code to dynamically create a timestamped directory if it's not there, and not create it if it is, doesn't work.  I can't understand why it doesn't, but it doesn't.  Can someone please help

  • Troubles importing a change request

    Hi experts, Does anybody know how to import a local change Request into another system, in this case my QAS? I was applying the following OSS notes: 1082441 Mexico Legal change Format-A29 SAPKH50020 12/02/2008 1111107 RFIDMXFORMAT29: Country name not

  • Problem when updating e66

    Hello all, I will explain my case, I drive to reinstall the software of my nokia E66 using Nokia OVI and the installation took a long time (over an hour) and when i tried to turn on my phone it didn't works. I wonder if it can be regulated or not? Th