Set the column name of a table in a list box

is there any code to set the column name of a table in a list box at oracle devloper 6i?
pls help.

I dont want to go for pl/sql . It should work any table.You want Dynamic SQL without using PL/SQL? Tricky. I'm sure there's a possible way using some very complex and convoluted XML functionality of SQL but in reality you are asking for something that isn't natural to SQL queries, especially if you are expecting a dynamic number of columns to be produced for each row of data. SQL expects a table structure, including output formats, to be a defined number of columns with any number of rows, not a defined number of rows with any number of columns.
Perhaps if you explain why you need this sort of functionality then we may be able to offer a better solution.
;)

Similar Messages

  • How to select even the column names of a table?

    Hello All,
    Is there a way to select even the column names of a table in the select statement?
    My select from a table (say X) is in a SQL* Plus script that gets invoked by application tier and displays data in the application tier window. User's can then copy the data into a spreadsheet and do their processing. However, I need to give them the column names too along with the data.
    Thanks,
    Chiru

    If there is a middle tier that is selecting and
    displaying the data, and that's what the users are
    copying from, the middle tier would have to address
    its presentation of the data to allow users to
    include column names. If this is a common task, the
    application should probably be modified to give users
    the option of downloading the data in a spreadsheet
    directly rather than forcing them to copy and paste
    data.Thanks for the reply.
    The users don't have to copy paste. The application tier has an options in the "Tools" menu item which allows them to copy the entire output to a file (in my case a txt file which is a pipe delimited). Then they have to do text to columns to get the data into each column of the spreadsheet. I could have directly called the stored procedures from the application tier and created ".csv" files and FTP'd them to the user's folders. However, I am having to go this round about because, I am not getting enough support from the LAN team in FTP'ing etc.
    OK I'll think of another workaround.
    Thanks,
    Chiru

  • How to read the column name of a table from sap system using C#?

    Hi!!
    I am using SAP .NET connector and creating a windows application.
    Now I wanna read the column name when a table name is given....
    Connection is done, but I don't know the code to read the column names alone...
    Can anyone help me with the code??

    fine!!
    So if i give the table name, which the RFC_READ_TABLE function module have, will it run properly? or i wanna change all the codes in order to support RFC_READ_TABLE function module?
    Because from the beginning I was using BAPI_CUSTOMER_GETLIST function, but my client requirement is to use ERP function module RFC_READ_TABLE, he didn't give any table name also..
    This is my code: What I have to change in this???
    ECCDestinationConfig ECCDestination = new ECCDestinationConfig();
                RfcDestinationManager.RegisterDestinationConfiguration(ECCDestination);
                RfcDestination rfcDest = null;
                rfcDest = RfcDestinationManager.GetDestination(a);
                    RfcRepository repo = rfcDest.Repository;
                    IRfcFunction customerList = repo.CreateFunction("BAPI_CUSTOMER_GETLIST");
                    IRfcTable addressData = customerList.GetTable("AddressTable"));
                    int j = addressData.Metadata.LineType.FieldCount;
                    for (int i = 0; i < j; i++)
                        RfcElementMetadata metadata = addressData.GetElementMetadata(i);
                        listallcolumn.Items.Add(metadata.Name);
    Message was edited by: Jeswin Rebil

  • How to display the column names of a table in the output

    Hi,
    I want to display the name of the columns of the table without using literals in a abap report.
    EX: Consider the table KNA1
    KUNNR NAME  ADDRESS
    I want to display the column names in the above fashion without using hardcoded write statements.
    Thanking in anticipation

    You can use this FM <b>DDIF_FIELDINFO_GET</b> It gives you all the names related to fields in a table -:)
    Greetings,
    Blag.

  • How can I list all the column names of a table by programming?

    Hi,
    Now I want to write an function which has the following features:
    Firstly, The function was given a parameter as table name.
    Then, it will lists all the columns names of the table.
    e.g
    table: person
    ---firstName------lastName----+
           Michale               Jackson
    We can get the columns 'firstname' and 'lastName' by calling the function with table name 'person'.
    And I also wonder that where I can get reference book or any other materials?
    Thanks.
    Edited by: wenjing wang on Feb 15, 2008 6:42 AM
    Edited by: wenjing wang on Feb 15, 2008 6:57 AM

    hi,
    hope the below code helps u. Just take the headee which contains the field name and split it like below and compare it with the field name u want here 'last name'.
    here,
    'First name' will be in wt_filedata1 and remaining field names in wt_filedata2, so 'do' continues.
    c_tab must be the separator, either , or + or tab etc..
    CODE:
    read table person into wl_header index 1.
    do.
        split wl_header at c_tab into: wt_filedata1 wt_filedata2.
        if wt_filedata1 <> 'lastname'.
          cnt1 = cnt1 + 1.
          wl_header = wt_filedata2.
        else.
          exit.
        endif.
      enddo.
    Please reward if it is useful.
    regards,
    sri

  • Finding the column names from a table.

    I am on 10g
    I would like to find out the columns of a table where there are null columns in a table.....this table contains about 300 + columns where i do not want to put where condition for all the columns
    is there a way i can write a sql to find?
    for a given table or the results set that i need to get, i will have same results for all the rows, so it
    cant be like col1 is null on row1, but col2 is not null on row2 ...they are all identical....
    example table, but it has 300 + cols
    F_IND     H_IND     P_IND     DMA_IND
    N     N          
    N     N          
    N     N          
    N     N          Thanks

    select count(col1), count(col2), count(col3), ...
    from your table;
    The results with 0s are null throughout the table (or the table has no rows).

  • Changing the Column name of a table horizontally

    Hi ,
    I have a table named emp.
    Empno Sal
    10 1000
    20 2000
    30 3000
    40 4000
    I need the output like
    Empno 10 20 30 40
    sal 1000 2000 3000 4000
    Note: It should work for any table. Also not the column & row mapping which should be synchronised like the original structure.

    I dont want to go for pl/sql . It should work any table.You want Dynamic SQL without using PL/SQL? Tricky. I'm sure there's a possible way using some very complex and convoluted XML functionality of SQL but in reality you are asking for something that isn't natural to SQL queries, especially if you are expecting a dynamic number of columns to be produced for each row of data. SQL expects a table structure, including output formats, to be a defined number of columns with any number of rows, not a defined number of rows with any number of columns.
    Perhaps if you explain why you need this sort of functionality then we may be able to offer a better solution.
    ;)

  • To get the column names of a table. How?

    I want to use the JDBC API to get the names of all columns of a table.
    But I didn't find any method for my purpose. Can you tell me how to do it? Thanks

    DatabaseMetaData meta = connection.getMetaData();
    ResultSet rs = meta.getColumns(null, null, 'TABLENAME', '%')
    while (rx.next())
       System.out.println(rs.getString(4);
    }For details see
    http://java.sun.com/j2se/1.4.2/docs/api/java/sql/DatabaseMetaData.html#getColumns(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String)

  • Show column names in a table

    Stupid question time...
    How do I display the column names in a table on the front panel? I thought by right clicking on the table would give me a selection to display them.
    Solved!
    Go to Solution.

    Hi Eric,
    you can set the cell background color of the "Active cell" (read the help for that property!) with a property node.
    To get the clicked cell you can use a method of the table to convert mouse coordinates (given by the event structure) to row/column coordinates!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Change the column names programatically

    Hi All,
    is it possible to change the column name in a table programatically?? my req is like this..I ve a table which contains 60 columns. out of these 60 columns 53 columns signifies the 53 weeks of the year. so i ve to display the date in the column headers. How can i achieve this?
    Thanks in advance,
    Sree

    Column prompts can be modified through the OAF Personalization screens. This will ensure you are declaratively setting the values.
    Regards,
    Prabodh.

  • Rename column name of a table

    Hi Guys,
    I want to rename the column name of a table. Lets say I have table employee:
    SQL> desc emp;
    Name Null? Type
    EMPNO NOT NULL NUMBER(4)
    ENAME VARCHAR2(10)
    JOB VARCHAR2(9)
    MGR NUMBER(4)
    HIREDATE DATE
    SAL NUMBER(7,2)
    COMM NUMBER(7,2)
    DEPTNO NUMBER(2)
    STARS VARCHAR2(8)
    I want to change the name of the cloumn name of ENAME to EMPNAME so that structure looks like this:
    SQL> desc emp;
    Name Null? Type
    EMPNO NOT NULL NUMBER(4)
    EMPNAME VARCHAR2(10)
    JOB VARCHAR2(9)
    MGR NUMBER(4)
    HIREDATE DATE
    SAL NUMBER(7,2)
    COMM NUMBER(7,2)
    DEPTNO NUMBER(2)
    STARS VARCHAR2(8)
    Can anyone tell me any statement or way to solve this problem. Please keep in mind that I will not delete the table or create another column name of EMPNAME and copy the data from ENAME to EMPNAME.
    Regds,
    Debabrata

    ALTER TABLE DEPT2 RENAME COLUMN ENAME TO EMPNAME
    Regards,
    Raj

  • Displaying only the column names

    hi there,
    is there any query to fetch only the column names from a table, excluding the datas from that particular column?
    Thanks,
    Balu.

    SQL> select * from dual
      2  where rownum < 1;
    no rows selected                                                                                                                                                                               

  • Column names from another table

    Hi All,
    I have a scenario where i need to get names of a column from another table
    for eg,
    Table EMP
    EmpNo EmpName EmpContact EmpPhone
    1 xyz [email protected] 345     
    2 abc [email protected] 897
    3 ttp [email protected] 345
    The column names of this table can be configurable from some other place and its value is stored in another table like
    Table Config (2 Columns)
    Column_Name Value
    EmpName First name
    EmpContact Email
    EmpPhone Mobile
    Now i want to fetch the values from Emp table but with column headers that are changed and have a value in Config table.
    If a column name is not there in config table then the original column name should come.
    As shown below
    EmpNo First name Email Mobile
    1 xyz [email protected] 345
    2 abc     [email protected] 897
    3 ttp [email protected] 345
    Another eg, If EmpName is not changed and entered in second table , then i want to have the same name as the original EMP table has as shown below.
    EmpNo EmpName Email Mobile
    1 xyz [email protected] 345
    2 abc     [email protected] 897
    3 ttp [email protected] 345
    In other words something like this,
    select empno,
    EmpName as (select value from config where column_name=EmpName),
                   EmpContact as (select value from config where column_name=Empcontact),
                   EmpPhone as (select value from config where column_name=EmpPhone)
         From EMP
    Can some one please help me in providing a solution for this.
    Edited by: 941386 on May 30, 2013 6:20 AM

    Unfortunately, I think this is a job for dynamic sql ...
    Build your "query" first:
    (note this won't work "as is", fix the syntax - but you get the idea.)
    lv_str := 'select empno,
    EmpName as ' || (select value from config where column_name=EmpName) || ',
    EmpContact as ' || (select value from config where column_name=Empcontact) || ',
    EmpPhone as ' || (select value from config where column_name=EmpPhone) || '
    From EMP;';
    execute immediate lv_str;Not sure if there's a better way or not.
    Only other way I can think of is to leverage the way UNION [ALL] works.
    So the following query:
    select a, b, c from dual
    union all
    select d, e, f from dual
    /returns data in columns "named" : "a, b, c"
    Effectively renaming columns d, e, f. You just need to turn your data on edge in that first query, then throw out the rows (I don't know how to get it to work, but perhaps somebody else does?)
    [edit]
    another thought is create a view over top of the table, query that view, then drop the view :P
    that would work nicely - avoid the dynamic SQL. shrug
    [edit]
    Edited by: Greg.Spall on May 30, 2013 9:37 AM

  • How to get the Column names of output that is displaying in Sql Developer(Oracle 11g).

    Hi,
        I am using OCCI to interact with DB through code, which means I am writing a vc++ file to interact with Data Base and execute the Stored Procedure which I am calling from the C++ Code. And  also displaying the output of the Stored Procedures to the Front End. I am succeeded in this, but now I should be able to display  the Column names of the output to Front End. Can any one help me on this.
    Example:
    Sno  |   Sname
    ------- |-------------
    1          ABC
    2          DEF
    I am getting (1,ABC) and (2,DEF) as the output of the Stored Procedure but I need the Column names also to display. How to get them.
    Thanks in Advance..:)

    Look at Re: exporting csv via pl/sql - select statement?
    It has an example how to extract the column name from a cursor. You have to check, whether you can use DBMS_SQL.DESCRIBE_COLUMNS
    Your procedure might need another out parameter, that returns the column names , e.g. as comma separated list or as varray.

  • What is the use of Position Column Name in USER_CONS_COLUMNS Table

    Please let me know the purpose of POSITION Column Name in USER_CONS_COLUMNS Table.
    Example :
    Created this below Table having two constraints 1.Primary Key 2.Check Constraint
    CREATE TABLE A(ID NUMBER PRIMARY KEY,NAME VARCHAR2(30),SAL NUMBER CHECK (SAL > 0))
    When i execute the below query
    SELECT POSITION,CONSTRAINT_NAME FROM USER_CONS_COLUMNS WHERE TABLE_NAME = 'A'
    it displays the data :
    POSITION CONSTRAINT_NAME
    1 SYS_C005488
    SYS_C005487
    Only for the first record it displays the POSITION but not for the second row.
    Kindly help me on this.

    SQL> CREATE TABLE A(
      2     ID1 NUMBER
      3   , ID2 NUMBER
      4   , NAME VARCHAR2(30)
      5   , SAL NUMBER CONSTRAINT A_SAL_POSITIVE CHECK (SAL > 0)
      6   , CONSTRAINT A_PRIMARY_KEY PRIMARY KEY (ID1, ID2)
      7  )
      8  /
    Table created.
    SQL> SELECT CONSTRAINT_NAME, POSITION, COLUMN_NAME
      2    FROM USER_CONS_COLUMNS
      3   WHERE TABLE_NAME = 'A'
      4   ORDER BY CONSTRAINT_NAME, POSITION
      5  /
    CONSTRAINT_NAME                  POSITION COLUMN_NAME
    A_PRIMARY_KEY                           1 ID1
    A_PRIMARY_KEY                           2 ID2
    A_SAL_POSITIVE                            SALA primary key constraint can have multiple columns - the position shows the order the columns are in the primary key definition (and thus also in the pk supporting index.)
    A check constraint does not have any such ordering of the columns involved, so therefore position is null.

Maybe you are looking for

  • How can I select between multiple JREs to run an *applet* in MSIE??

    (I'm posting this after spending quite a bit of time trolling the Forum for an answer, and could definitely use some help - thanks in advance!) I've got an applet that opens a socket to a small server running on an embedded controller to download som

  • My Macbook will not stay connected to the internet, while my Dell computer works fine. Why? What can I do?

    My sister and I both have Macbook Pros that will not stay connected to our internet (wifi). Our dell computers and HP computers in the household work great- but both of the Macs do not stay connected, and often say "you are not connected to the inter

  • Differences between Adobe 7.0 & Adobe 8

    I have a pdf form I created using Adobe 7.0 professional, some in my company have upgraded to Adobe reader 8.0 and can not submit the form via email, why is this? Also if I was to redo the form in Adobe 8.0 would users with Adobe reader 7.0 still be

  • Can Only Compile a Package in Object Browser  ORA-06502

    I am running Apex 3.0.1 against a 10.2 Database.. I have at least 2 packages, that I can only change in APEX using the Object Browser, If I try using SQL Developer/TOAD or any other tools it returns the error message below. The package bodies are aro

  • PO for Assets - Confg

    Hiii SAP gurus, this is ramki can any body tell me how to raise Purchase Orders for Capital Goods ( Assets ) and the required configuration also... Tell me step by step .. 1. How to create Material group for Capital Goods , is there any Valuation Cla