REG COLUMN

Hi,
Is there a way that we count the number of columns present in a table.
Count(*) - provided the number of rows in a table.
How too count the number of columns for a table. Any advices please
Cheers
Kumar

This?:
select count(*) from all_tab_cols where owner=YOUR_OWNER and table_name=YOUR_TABLE_NAME and hidden_column='NO'

Similar Messages

  • Reg:column name

    Hi,
    I have column names like this
    OR_LOG.LOG_ID , POSTOP_TABLE.POSTOP_DIAG , POSTOP_TABLE.NO_POSTOP
    so can i write a query like this
    select ol.log_id , pt.postop_diag , pt.no_postop from table;

    You can do. For this you need to specify the table alias. For example...
    select t1.col1, t1.col2, t2.col1, t2.col2 from table t1, table t2-Ammad

  • Reg : Column Size -

    Hi All,
    I've got a doubt regarding alter the column size.
    There's a table column which is currently 255 and I want to increase it to max i.e. 4000 Char
    It is used in many places by various objects - Procs/Packages/Triggers/Views...
    Is it advisable to use Varchar2(4000Char) or using LONG or CLOBS??
    If I use LONG/CLOB now, will it affect the existing objects since they believe the column to be VARCHAR2...?
    Help highly appreciated.
    My Database :
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
    PL/SQL Release 10.2.0.3.0 - Production
    CORE     10.2.0.3.0     Production
    TNS for Solaris: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - ProductionThanks in Advance,
    Ranit B.

    ranit B wrote:
    Hi All,
    I've got a doubt regarding alter the column size.
    There's a table column which is currently 255 and I want to increase it to max i.e. 4000 CharBe aware, the Maximum is 4000 bytes not char. If your database is using a multi byte character set, the maximum could actually be as small as 1000 characters (if you have 4 bytes per character).
    It is used in many places by various objects - Procs/Packages/Triggers/Views...
    Is it advisable to use Varchar2(4000Char) or using LONG or CLOBS??Never use LONG. the LONG datatype was deprecated over a decade ago. If you're needing to store large amounts of text, use CLOB.
    If I use LONG/CLOB now, will it affect the existing objects since they believe the column to be VARCHAR2...?It's one of those "it depends" answers, because it depends what the code is doing with it. It's not so much a case of the code/objects believing it to be varchar2, but whether that code or objects can do implicit conversions without issue. If it's just a case of something inserting into it, believing it's a varchar2, then it would work ok e.g.
    SQL> create table mytable (x clob);
    Table created.
    SQL> insert into mytable (x) values ('This is my varchar string');
    1 row created.The problem would obviously be if there is code that is reading the data into a varchar2 variable or datatype and the data exceeds the 4000 byte limit, in which case you will get issues.
    The best way to look at is is... Yes, it will effect existing code/objects, and you need to carry out an impact analysis to see where and how it's used.

  • Reg Column wrapup

    Hi all,
    I have a requirement wherein i need to wrapup the text after 30 characters, i have used the following code in Iterator- Get_Column_Definition
    tv_column-COLUMNNAME  = 'COMMENTS'.
    tv_column-edit        = 'X'.
    tv_column-sort        = 'X'.
    tv_column-TITLE       = 'COMMENTS'.
    tv_column-WIDTH  = '30'.
    tv_column-WRAPPING = 'X'.
    But i could not see any result. Here i want the visible length of the field as 30.
    Can anyone suggest?
    Thanks and Regards,
    Sneha.

    You can do. For this you need to specify the table alias. For example...
    select t1.col1, t1.col2, t2.col1, t2.col2 from table t1, table t2-Ammad

  • Reg:How to delete the column in table control also from database table.

    Hi Experts,
    Once again thank u all for giving the responses.
    one more doubt is how to delete the columns of table control and also the record shold delete from ztable.
    With Regards,
    Saroja.P.

    Hi,
    If you want to delete the rows in the table control and simultaneously delete it from the database table, then you can implement a 'DELETE' functionality specific to your table control. Have a MARK field (you will find that in the screen attributes of the table control -> give a name for the MARK field, you will find an additional MARK column at the beginning of your table control). You can check whatever rows you want to delete from the table control, call the delete module.
    "This portion of code inside the LOOP...ENDLOOP.
    IF sy-ucomm eq 'F_DELETE'.
       gt_itab2-check = mark.  " Store the MARK field status into your internal table's correspoding field 'check'
      MODIFY gt_itab INDEX tabcontrol-current_line.
    ENDIF.
    iF sy-ucomm eq 'DELETE1'.
      DELETE gt_itab WHERE check eq 'X'. "Your internal table does not have rows that you want to delete
    ENDIF.
    Now you can modify your database table using the MODIFY statement.
    MODIFY ZDB FROM TABLE gt_itab.

  • Issue with MB51 - Value in Amount in LC column- Reg

    Dear ALL,
    I have an issue from Materia Ledger  - while executing the report MB51  to view the material document with relevant to MIGO process (GRN with movement type 101), it has been noticed  that  some items it is picking up the value in amount in LC column and for some items it is NOT picking up the value, for this client Material Ledger is activated, please share your views on the subject..
    Thanks & Regards
    Rambabu

    HI
    check there if any  FI document created or not for your material document for which you are not getting value
    I think there will not  there will not any FI document and check you have storage location tab on where tab in MIGO
    if no storage location tab then its consumption
    Regards
    Kailas Ugale

  • Reg: View column datatype

    Hi Team,
    While creating the views, column automatically converted into varchar2(81) data type from number datatype.
    but stage1 table has legacy_trx_number is number data type and statg2 table has header_num is number data type.
    Just i added the highlighted part in the view. So automatiicaly converted number to varchar2 datatype. How to keep data type remain the same as source stage table datatype even though those columns used in the view.
    CREATE OR REPLACE VIEW test_view  AS
        SELECT h1.legacy_trx_number
          ||'.'
          ||h2.header_num legacy_trx_number,
          h1.legacy_trx_date,
          h1.ledger_id,
          h1.legal_entity_id,
          h1.header_record_identifier,
          h2.header_num,
          h2.gl_date,
          h2.header_value_full,
          h2.header_value
        FROM stage1 H1,
          stage2 H2
      WHERE h1.header_record_identifier = h2.header_record_identifier;
    Please help give me suggestion on this.
    Thanks in advance.

    You can do it like this!
    Example:-
    SQL> ed
    Wrote file afiedt.buf
      1  create view v_num_test
      2  as
      3* select to_number(5478||'.'||87489) result from dual
    SQL> /
    View created.
    SQL> select * from v_num_test;
        RESULT
    5478.87489
    SQL> desc v_num_test
    Name                                      Null?    Type
    RESULT                                             NUMBER

  • Reg: ALV report download to excel currency columns

    Hi All,
    While downloading the alv report to excel, currency fields with negative sign(less than 0) is downloading without negative sign.
    And field catalog wad declared as 'CURR' field for that particular column, if I declared as 'CHAR', i am getting shortdump.
    Can any one tell me how to get the negative sign.
    Thanks in advance.

    Hi,
    Do you use ALV to excel standard functionality or your own code to excel?
    Please provide more information.
    Thanks,

  • Reg no of columns in alv

    Hi,
         Am displaying 113 columns in alv, when i export to excelsheet only 99 columns are exported remaining are not exported. plz tell how to export all the columns.
    tanks,
    vino.

    Hi Vino,
    The process for downloading into excel with correct columns can be done in many ways
    I suggest you to read the following and then go about for a trial and error and in case you find difficulty revert back
    After generating a report, it is possible to export it into Microsoft Excel and/or Microsoft Word using three different options. Each of these options saves the file in a slightly different format. Before using any of these options, you have to set the macro security in your Office products to medium.
    Within your Office program, follow the menu path Tools > Macro > Security. Select the Medium security setting. Then click the Trusted Sources tab and ensure all the check boxes are selected. Click OK to save the changes. For the best results, ensure your Office program is closed before performing any of the following actions.
    Save to Local File
    Using this export option will retain all of the formatting that you may have done to the report in SAP, such
    as moving columns, setting filters and sorts, etc., but will not retain any of the color or font formatting in
    SAP, unless you choose the HTML option.
    1. Click (Local file). The Save list in file... box will open.
    2. Choose the desired file type in which to save the file.
    u2022 unconverted - tab-delimited file not associated with a program
    u2022 Spreadsheet - Microsoft Excel file
    u2022 Rich text format - Microsoft Word file
    u2022 HTML format - HTML file. This option adds some formatting, which will make it display
    similiar to the report in SAP.
    3. Click (Continue). The Transfer DAT to a Local File box will open.
    4. The default location in which to save the file is your "SAPWorkDir" folder. Click (Search) to
    choose another location.
    5. Enter your file name at the end of the path and use the proper extension associated with the file
    type you chose in step 2.
    u2022 unconverted - none
    u2022 Spreadsheet - .xls
    u2022 Rich text format - .rtf
    u2022 HTML format - .html
    6. Click . The message "XXX Bytes transferred" will display, indicating that your file was
    successful exported.
    Exporting to Microsoft Excel
    Using this export option will not retain any of the formatting that you applied in SAP, such as moving
    columns, setting filters and sorts, etc. However, it does add a colored background and heading and
    retains the proper column width.
    1. Click (Spreadsheet...). An Information box will open advising you that any formatting you have
    applied in SAP will not be exported with the data.
    2. Click (Continue). The Export list object to XXL box will open.
    3. Choose Table and click (Continue).
    4. Click (Continue) again.
    5. Excel will open with the report displayed. You can now format the report and save it as necessary.
    6. In SAP, an Information box opens stating that you should save the data in the spreadsheet. As
    soon as you click (Continue), the report in Excel closes, so be sure you have saved it if
    necessary before doing so.
    Opening Microsoft Excel within SAP
    This export option will actually open Microsoft Excel within SAP, allowing you to use any of the formatting
    or calculation features available in Excel along with the SAP tools. However, modifying the data in the
    Excel spreadsheet within SAP will not change the actual data in SAP itself.
    1. Click (Change layout...). The Change layout box will open.
    2. Click the View tab.
    3. Choose the Excel option.
    4. Click on sap_om.xls in the Template list that displays on the right side of the box.
    5. Click (Transfer).
    6. Microsoft Excel will open in the window where the report data was displayed. You can now use all
    of the options within Microsoft Excel and SAP to format and manipulate the data as necessary.
    7. To save the file, follow the Excel menu path File > Save Copy As.
    8. To close Excel, click (Change layout...), click the View tab, choose the Grid option, and click
    (Transfer).
    Exporting to Microsoft Word
    Using this option will not retain any of the formatting that you applied in SAP, such as moving columns,
    setting filters and sorts, etc., and it will export the data in a table within Word.
    1. Click (Word Processing...). The Word Processor Settings box will open.
    2. Choose the Create Document option and select Include Colors and/or Start MS Word if desired.
    3. Click (Continue). The Transfer RTF to a Local File box will open.
    4. The default location in which to save the file is your "SAPWorkDir" folder. Click (Search) to
    choose another location.
    5. Enter the file name at the end of the path and add the extension .rtf.
    6. Click .
    7. If you chose the option to have Word open, it will now open with the data displayed.
    Thanks in advance
    Sikanth.p

  • Reg: Adding addtional columns to standard CNE5 transaction output

    Dear Experts,
    I'm new to Project system.I need to develop a report on POC in Project System. PS consultant told me CNE5 transaction is the close report, to develop the requirement. I need to add few more output fields.
    Can anyone help me in achieving the results.
    I have not worked on enhancement points... To add the additional columns we need to modify the standard program.
    Please suggest me how to start to developing the report.
    Thanks and Regards,
    Abdur Rafique
    Moderator Message: It's a good time to read-up on Enhancement Spots.
    Edited by: kishan P on Mar 2, 2011 11:18 AM

    Hi,
    This can be done in standard without using ABAP.
    just  define profile for display field & assing it to PS Info profile.
    Regards,
    Sam L.

  • Reg: read excel column and insert into table.

    hi Friends,
          i wanted to read the data from Excel and insert into in my oracle tables.
          can you provide the link or example script.
        how to read the column value from excel and insert into table.
      please help.

    < unnecessary reference to personal blog removed by moderator >
    Here are the steps:
    1) First create a directory and grant read , write , execute to the user from where you want to access the flat files and load it.
    2) Write a generic function to load PIPE delimited flat files:
    CREATE OR REPLACE FUNCTION TABLE_LOAD ( p_table in varchar2,
    p_dir in varchar2 DEFAULT ‘YOUR_DIRECTORY_NAME’,
    P_FILENAME in varchar2,
    p_ignore_headerlines IN INTEGER DEFAULT 1,
    p_delimiter in varchar2 default ‘|’,
    p_optional_enclosed in varchar2 default ‘”‘ )
    return number
    is
    – FUNCTION TABLE_LOAD
    – PURPOSE: Load the flat files i.e. only text files to Oracle
    – tables.
    – This is a generic function which can be used for
    – importing any text flat files to oracle database.
    – PARAMETERS:
    – P_TABLE
    – Pass name of the table for which import has to be done.
    – P_DIR
    – Name of the directory where the file is been placed.
    – Note: The grant has to be given for the user to the directory
    – before executing the function
    – P_FILENAME
    – The name of the flat file(a text file)
    – P_IGNORE_HEADERLINES
    – By default we are passing 1 to skip the first line of the file
    – which are headers on the Flat files.
    – P_DELIMITER
    – Dafault “|” pipe is been passed.
    – P_OPTIONAL_ENCLOSED
    – Optionally enclosed by ‘ ” ‘ are been ignored.
    – AUTHOR:
    – Slobaray
    l_input utl_file.file_type;
    l_theCursor integer default dbms_sql.open_cursor;
    l_lastLine varchar2(4000);
    l_cnames varchar2(4000);
    l_bindvars varchar2(4000);
    l_status integer;
    l_cnt number default 0;
    l_rowCount number default 0;
    l_sep char(1) default NULL;
    L_ERRMSG varchar2(4000);
    V_EOF BOOLEAN := false;
    begin
    l_cnt := 1;
    for TAB_COLUMNS in (
    select column_name, data_type from user_tab_columns where table_name=p_table order by column_id
    ) loop
    l_cnames := l_cnames || tab_columns.column_name || ‘,’;
    l_bindvars := l_bindvars || case when tab_columns.data_type in (‘DATE’, ‘TIMESTAMP(6)’) then ‘to_date(:b’ || l_cnt || ‘,”YYYY-MM-DD HH24:MI:SS”),’ else ‘:b’|| l_cnt || ‘,’ end;
    l_cnt := l_cnt + 1;
    end loop;
    l_cnames := rtrim(l_cnames,’,');
    L_BINDVARS := RTRIM(L_BINDVARS,’,');
    L_INPUT := UTL_FILE.FOPEN( P_DIR, P_FILENAME, ‘r’ );
    IF p_ignore_headerlines > 0
    THEN
    BEGIN
    FOR i IN 1 .. p_ignore_headerlines
    LOOP
    UTL_FILE.get_line(l_input, l_lastLine);
    END LOOP;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    v_eof := TRUE;
    end;
    END IF;
    if not v_eof then
    dbms_sql.parse( l_theCursor, ‘insert into ‘ || p_table || ‘(‘ || l_cnames || ‘) values (‘ || l_bindvars || ‘)’, dbms_sql.native );
    loop
    begin
    utl_file.get_line( l_input, l_lastLine );
    exception
    when NO_DATA_FOUND then
    exit;
    end;
    if length(l_lastLine) > 0 then
    for i in 1 .. l_cnt-1
    LOOP
    dbms_sql.bind_variable( l_theCursor, ‘:b’||i,
    ltrim(rtrim(rtrim(
    regexp_substr(l_lastLine,’([^|]*)(\||$)’,1,i),p_delimiter),p_optional_enclosed),p_optional_enclosed));
    end loop;
    begin
    l_status := dbms_sql.execute(l_theCursor);
    l_rowCount := l_rowCount + 1;
    exception
    when OTHERS then
    L_ERRMSG := SQLERRM;
    insert into BADLOG ( TABLE_NAME, ERRM, data, ERROR_DATE )
    values ( P_TABLE,l_errmsg, l_lastLine ,systimestamp );
    end;
    end if;
    end loop;
    dbms_sql.close_cursor(l_theCursor);
    utl_file.fclose( l_input );
    commit;
    end if;
    insert into IMPORT_HIST (FILENAME,TABLE_NAME,NUM_OF_REC,IMPORT_DATE)
    values ( P_FILENAME, P_TABLE,l_rowCount,sysdate );
    UTL_FILE.FRENAME(
    P_DIR,
    P_FILENAME,
    P_DIR,
    REPLACE(P_FILENAME,
    ‘.txt’,
    ‘_’ || TO_CHAR(SYSDATE, ‘DD_MON_RRRR_HH24_MI_SS_AM’) || ‘.txt’
    commit;
    RETURN L_ROWCOUNT;
    end TABLE_LOAD;
    Note: when you run the function then it will also modify the source flat file with timestamp , so that we can have the track like which file was loaded .
    3) Check if the user is having UTL_FILE privileges or not :
    SQL> SELECT OWNER,
    OBJECT_TYPE
    FROM ALL_OBJECTS
    WHERE OBJECT_NAME = ‘UTL_FILE’
    AND OWNER =<>;
    If the user is not having the privileges then grant “UTL_FILE” to user from SYS user:
    SQL> GRANT EXECUTE ON UTL_FILE TO <>;
    4) In the function I have used two tables like:
    import_hist table and badlog table to track the history of the load and another to check the bad log if it occurs while doing the load .
    Under the same user create an error log table to log the error out records while doing the import:
    SQL> CREATE TABLE badlog
    errm VARCHAR2(4000),
    data VARCHAR2(4000) ,
    error_date TIMESTAMP
    Under the same user create Load history table to log the details of the file and tables that are imported with a track of records loaded:
    SQL> create table IMPORT_HIST
    FILENAME varchar2(200),
    TABLE_NAME varchar2(200),
    NUM_OF_REC number,
    IMPORT_DATE DATE
    5) Finally run the PLSQL block and check if it is loading properly or not if not then check the badlog:
    Execute the PLSQL block to import the data from the USER:
    SQL> declare
    P_TABLE varchar2(200):=<>;
    P_DIR varchar2(200):=<>;
    P_FILENAME VARCHAR2(200):=<>;
    v_Return NUMBER;
    BEGIN
    v_Return := TABLE_LOAD(
    P_TABLE => P_TABLE,
    P_DIR => P_DIR,
    P_FILENAME => P_FILENAME,
    P_IGNORE_HEADERLINES => P_IGNORE_HEADERLINES,
    P_DELIMITER => P_DELIMITER,
    P_OPTIONAL_ENCLOSED => P_OPTIONAL_ENCLOSED
    DBMS_OUTPUT.PUT_LINE(‘v_Return = ‘ || v_Return);
    end;
    6) Once the PLSQL block is been executed then check for any error log table and also the target table if the records are been successfully imported or not.

  • Reg: Rows_Processed column in v$SQLAREA

    Hi all,
    I had a request to check the rows processed while an insert statement is running in the database.
    Can anyone clarify me on this from v$sqlarea (rows_processed) is it possible to get the rows processed till that time.
    As i am in thinking that it depends on how application has commit transactions.
    Can any one throw some light on this request...
    Thanks in advance...
    Satya G

    Hi,
    Rows_processed column of v$sql gives the count of total rows that has been processed whether it is committed or not committed. It gives the sum of rows processed by the query even if some of the transaction has been rollbacked.
    I suppose you are looking for USED_UREC in v$transaction.
    Regards
    Anurag

  • Reg BSP table column title

    Hi All,
    I have problem with BSP table title display for one of the field.
    The current code of
    <%-- -
    Create table for line item----
    --%>
                                                      <htmlb:tableView id    = "tv_eban"
                                                                table = "<%= it_final %>" >
                                                      </htmlb:tableView>
                                                      </htmlb:tabStripItem>
                                                  </htmlb:tabStrip>
    The table field titles are defined and comes by default. From where does the sap table title text is coming. Here can we now update to display the new title for one of the new table field.
    Thanks in advance. Please let me know if you need any further details.
    From
    Reddy.

    Hi Readdy,
    The column title of the BSP application comes from each data-element's field label of your table columns.
    For example, let us assume that internal table contains two columns, say
    col1 type char10
    col2 type char50
    where,
    col1 and col2 are column names of the internal table and
    char10 and char50 are data elements associated with col1 and col2 respectively.
    Now when you display this structure in a table view then by default the title is got from the data element. The field label in the data element is used for this purpose.
    In our example, the char10 field label is blank and char50 filed label is 'c'. So by default the col1 title will be blank and col2 title will be 'c'. (Don't worry i have cross-checked it).
    There are three ways where you could give your own title
    1. Provide a correct data element to the columns with correct field labels.
    2. Change the BSP code by providing the title as given below,
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <htmlb:content design="design2003">
      <htmlb:page title = "Table view column defult title text ">
        <htmlb:form>
            <htmlb:tableView id="tv1" table="<%= itab %>">
            <htmlb:tableViewColumns>
            <htmlb:tableViewColumn columnName="col1" title="Column 1"></htmlb:tableViewColumn>
            <htmlb:tableViewColumn columnName="col2" title="Column 2"></htmlb:tableViewColumn>
            </htmlb:tableViewColumns>
            </htmlb:tableView>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    3. To implement a iterator for this table view and change the title. (This has loads of features in order to modify the table view display).
    Hope it helps! Please search in the sdn forums for more intresting ways of using the tableview tag. As suggested by SAP Mentor Graham Robinson, please look into the example BSP application for more information.
    Regards,
    Maheswaran
    Edited by: Maheswaran B on Mar 8, 2010 5:02 PM

  • Reg. Updation of PRPS table columns .use of  BAPI_BUS2054_CHANGE_MULTI

    Hi,
    I have used the sequence of BAPI calls as provided below.
    BAPI_PS_INITIALIZATION
    BAPI_BUS2054_CHANGE_MULTI
    BAPI_PS_PRECOMMIT
    BAPI_TRANSACTION_COMMIT
    I would like to update some columns of PRPS table for specified WBS element, uploading data from an excel sheet.
    I get the data from excel sheet to an internal table and pass to BAPI_BUS2054_CHANGE_MULTI row by row.
    It's strange ! .it updates every column for all the row of data w.r.t WBS element But  location field for first row data element get updated and rest ignored.
    can you please suggest me why it happens so?
    Thanks in advance.
    Regards,
    Sourya Prakash.

    Thanks for other responses I got .

  • Reg: Nullable column search

    Hi all,
    I have a table DIAGNOSIS which has a QDESC as a nullable column.
    columns DIAGCODE and SDESC are not nullable.
    I have written a Stored Procedure to retrieve records from DIAGNOSIS table based on the columns values specified.
    p_<column_name> indicates the parameter passed to the Stored Procedure
    The correspong SQL statement goes as follows.
    SELECT * FROM DIAGNOSIS
    WHERE
    UPPER(DIAGCODE) LIKE
    (CASE WHEN LENGTH(p_DIAGCODE) > 0 THEN '%' || UPPER(p_DIAGCODE) || '%' ELSE '%' END)
    AND UPPER(SDESC) LIKE
    (CASE WHEN LENGTH(p_SDESC) > 0 THEN '%' || UPPER(p_SDESC) || '%' ELSE '%' END)
    -- QDESC is a nullable field; but the following logic doesnt work :-(
    AND UPPER(QDESC) LIKE
    (CASE WHEN LENGTH(p_QDESC) > 0 THEN '%' || UPPER(p_QDESC) || '%' ELSE '%' END)
    Sample data of the table is as follows.
    DIAGCODE SDESC QDESC
    123 DESC 1 AAA
    123 DESC 2
    123 DESC 3 BBB
    123 DESC 4
    When I use the above query to find records with DIAGCODE as 123, I get
    DIAGCODE SDESC QDESC
    123 DESC 1 AAA
    123 DESC 3 BBB
    i.e QDESC with null values are not displayed.
    How am I supposed to modify the query to get the correct result?
    Any help would be highly appreciated.
    Thanks n Regards,
    Tanuja

    Let's assume the formal parameter is called p_column_name.
    The actual content of that parameter is 'DIAGCODE' or 'Q_DESC' or whatever.
    In static sql
    you can only have
    &lt;column_name&gt; = &lt;constant&gt;
    and &lt;constant&gt; can be replaced by a bind variable.
    This construct
    select *
    from &lt;table&gt;
    where p_column_name is null
    is not going to work, as there is no p_column_name in that table.
    This construct
    declare
    dynstr varchar2(100);
    p_dummy varchar2(100);
    p_column_name varchar2(30);
    begin
    p_column_name := 'bar';
    dynstr := 'select bar from foo where '||p_column_name||' is null';
    execute immediate dynstr into p_dummy;
    end;
    although silly dummy code is going to work.
    Hth
    Sybrand Bakker
    Senior Oracle DBA

Maybe you are looking for

  • DME file structures

    Hi, While generating DME file, i store header data, detail data, and trailer data in separate structure. But what happens is the data are printing continuously. I want to print header data in first line and detail data should commence on next line. H

  • Need a mapping program

    Just switched to a Mac from a PC. I need to find a mapping program similar to Microsoft Mappoint. Can't seem to find anything that will sub for this, any help out there???

  • Workflow help, Please??

    I'm sorry to ask this again, but perhaps my first time asking was too detailed, hence no responses :( What is the most effective workflow order for intricate edits? 3 images, with details from each to be incorporated into one image.  Background color

  • Opening ai files in CS4?

        I have PS CS4 and have never used Illistrator but from what I have read about vector and ai files I would love to be able to use them.  I create digital scrapbooking products and like how they can be sized without losing resolution quality.  I ca

  • [SOLVED] Netcfg.service not starting with systemd

    I have net-auto-wireless.service enabled and working, but when I try to start netcfg.service, it gives the error: Job for netcfg.service failed. See 'systemctl status netcfg.service' and 'journalctl' for details. "systemctl status netcfg.service" giv