Exclude unoccupied columns

I would like to be able to issue a select statement in SQL*plus or use an Oracle view to return data from occupied columns only without having to specify every column name in the table.
Is there a way of doing this simply?

it is possible through dynamic sql.you can pass not null column as a patrameter.
look like:
=======
create or replace procedure selecttable1(p_table_name in varchar2,p_col1 in varchar2,p_col2 in varchar2,p_col3 in varchar2,p_whr in number) is
v_stmt varchar2(2000);
v_stmt1 varchar2(2000);
begin
v_stmt:='select '||p_col1||p_col2||'from '||p_table_name||'where '||p_col3||'='||p_whr;
execute immediate v_stmt into v_stmt1 ;
dbms_output.put_line(v_stmt1);
end selecttable1;

Similar Messages

  • How to Use COLUMN NOPRINT - need to exclude one column from Select *

    Dear Friends,
    I need to exclude one column from a SELECT * query. Everytime the column data type is BLOB, I dont' want it to be part of my SELECT. After googling I found some info about NOPRINT but it doesn't seem to be working in my case. May be I am using it incorreclty.
    COLUMN FILE_DESC NOPRINT
    SELECT * FROM FILES;
    Where FILE_DESC is of BLOB datatype.Can I use it in my SELECT or it has to be used in Dynamic SQL? Is there any other option to achieve this?
    Thanks in advance.

    Hi,
    COLUMN FILE_DESC NOPRINT
    affects all queries in the same SQL*Plus session (unless you cancel it with a COLUMN FILE_DESC PRINT command.)  It doesn't matter if those queries are static or dynamic.  As mentioned before, COLUMN is a SQL*Plus command.  If you using a different front end, then it may have a different way to hide specific output columns.
    Did you have a poroblem when you tried it?  Post a complete test script that the people who want to help you can use to re-create the problem and test their ideas.
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • Exclude some columns during TDMS transfer

    Good morning.
    We need to exclude some columns during our TDMS transfer.
    For example, we have a table with 10 fields at the sender, we only need 8 fields to show up at the receiver.
    I have reviewed all my TDMS documents and TDMS on-line help but found no info about  this.
    Did any expert do similar thing before?
    Thanks!

    SAPUSERSS wrote:
    > We need to exclude some columns during our TDMS transfer.
    > For example, we have a table with 10 fields at the sender, we only need 8 fields to show up at the receiver.
    > Thanks!
    Hello ,
    Another potential workaround could be to use Scrambling rules for such fields
    and in the scrambling logic force the fields values to SPACE so that in the reciever those fields (Columns) are not transferred
    with any data.
    Cheers..!

  • Dynamic script task to copy data from one server table to another server table excluding Timestamp column ?

    I have two server TestSource and TestDestination . In both the tables I have common table like below. I would like to copy the data from TestSource server src_Table to TestDestination server  table dest_table
    excluding the column timestamp. This process I would like to achieve dynamically. Since I have 50 tables where I need to copy from source server to destination server.
    Rule : This needs to achieve using script task. Please help me to find the solution as it is very urgent requirement.
    Above rule is because No option to choose export wizard dynamic query option for linked server.
     --Source
    Table
    CREATE TABLE src_table
    a int,
    b int,
    c timestamp
    --Dest Table
    CREATE TABLE dest_table
    a int,
    b int,
    c timestamp
    Thank you in advance.
    Hari

    I have two server TestSource and TestDestination . In both the tables I have common table like below. I would like to copy the data from TestSource server src_Table to TestDestination server  table dest_table
    excluding the column timestamp. This process I would like to achieve dynamically. Since I have 50 tables where I need to copy from source server to destination server.
    Rule : This needs to achieve using script task. Please help me to find the solution as it is very urgent requirement.
    Above rule is because No option to choose export wizard dynamic query option for linked server.
     --Source
    Table
    CREATE TABLE src_table
    a int,
    b int,
    c timestamp
    --Dest Table
    CREATE TABLE dest_table
    a int,
    b int,
    c timestamp
    Thank you in advance.
    Hari

  • Excluding a column causes non-repeating values in 2nd table view

    I have an analysis (11.1.1.5) that has these columns: Month, Country, State, City, Sales, Country Sales, Share of Country. Country Sales is a level-based measure that returns sales at the Country level. Country, State, and City are a hierarchy as you might expect.
    When I display the initial Table view for this analysis, the Country Sales column shows a value on every row.
    When I create a 2nd Table view and exclude the City column from that view, the Country Sales column now only shows a value for the first State within each Country. In other words, each value of Country Sales is shown only once, and is NOT repeated on each subsequent row for that country.
    Any ideas if this is a bug, or if it was intentionally designed this way for some reason? Is there a way to force the values to repeat? (Green Bar / Repeat doesn't do it.)

    Thank you for the responses, guys. Still no luck.
    I moved the Country Sales column as Deepak suggested, both in the criteria and in the view. That didn't change the results. I also started fresh with a new analysis, and placed the columns in the suggested positions from the start. Still no change.
    New information: I tried excluding State and leaving City in the table view. Got the same goofy results - Country Sales did not repeat.
    More new information: I added a Brand Revenue measure to the Sample Sales subject area. Brand Revenue is defined as '1 - Revenue' at the Product Brand level. Created a similar view, and it worked fine.
    I'll investigate what the differences might be between Sample Sales and my repository. Hard to imagine what it might be. My repository is very simple and straightforward.

  • How to get the data by excluding the columns which are having null values

    I have a table with 10 columns , 3 columns are having all null values . I want to retrive the data by excluding these 3 columns. That means output table should contain only 7 columns .
    Can u give a query on this?
    Thanks,
    Mahesh

    select <list of column with not null values>
      from table_nameThat is you need to specify the column name.

  • Interactive report - exclude a column  from download

    We have an interactive report that is filtered, sorted, etc by the user to get the exact set of data that they need to download.
    We need to download only certain columns of the report.
    We don't want the users to have to hide columns.
    I'm looking for something like the "include in export" that can be specified for each column in a standard report.
    I don't see a place to set that in an interactive report.
    Is there a setting that I've missed?
    If not, any suggestions for possible solutions would be appreciated.
    thanks

    Hi,
    You can set column conditionally by request.
    E.g. columns that you do not like export set condition PL/SQL function body returning a boolean
    RETURN NVL(:REQUEST,'EMPTY') NOT IN('CSV','XLS','PDF','XML','RTF');I did example
    http://apex.oracle.com/pls/otn/f?p=40323:63
    EMPNO column is not exported from report
    Br,Jari
    Edited by: jarola on Jun 4, 2010 11:37 AM

  • Excluding Header Column from sort

    Hi,
    I am working with a simple league table for sports.
    I want to sort the league table descending by "Points" but I don't want the header column (which contains numbers 1 ... 32 for position) to be sorted.
    I want the header column to remain as set but the other part of the spreadsheet to sort.
    I can't seem to find a way to do this.
    Thanks,
    Matt

    Matt,
    You aren't allowed to sort some columns and not others because this breaks the relationships between fields in the sorted records. There are two ways to treat this that come quickly to mind, and there may be others.
    First, you could have your header column be actually in another Table located just to the left of your main table. That way it wouldn't be included in the sort.
    Another way would be to make your position count to be generated by a formula, such as =ROW(). If you have a Header Row with titles in it and your count begins on row 2, you could program =ROW()-1
    Regards,
    Jerry

  • Excluding history column, version column, created by etc in populating attr

    Hi ,
    I wanted to populate the attributes of a View Object in UI. Is there a way that I can filter out the Created by , Created on , Version history etc ? Just wanted to check if are there any way exists rather than checking one by one .
    Thanks & Regards,
    priya.R

    priya.R
    Your question isn't clear - what do you mean by "filtering out"?
    Do you mean when you drag and drop the VO from the data control to your page, you don't want certain attributes displayed by default? Have a look at the UI hints for the attribute in either the EO or the VO - you can set an attribute to hide by default
    John

  • Interactive report: Can I exclude a particular column from single row view?

    Hi -- I posted on this yesterday (Possible to exclude interactive report column from single row display?
    a bit anxious for suggestions, I guess!
    I've added a column with edit-link functionality to my interactive report query (that is, the link
    is not attached to the database data... it's an additional column and shows an icon). It's also
    in addition to the default single row view link. (We need both.)
    Unfortunately, the Edit link column shows up in the single row view. I've pared it down as much
    as I can: the label is empty, and the null value shows as "-". But an extra row with "-" is pretty
    ugly. Is there a way to always, completely exclude this column from the single row view?
    I know I could put the edit link on a data column, but:
    1) I want the link to always be to the left of the data (and the user can re-order columns)
    2) when the user doesn't have edit privileges, the link will need to be disabled or just not
    be displayed, and I think that would be a problem if the link were on the data. (true?)
    Thanks,
    Carol

    Please disregard this thread, and the one it refers back to. I see a flaw in the design of what I was attempting to do! Creating the link for Editing as a column means the user could inadvertently not display it, or move it, or... any number of problematic scenarios.
    Thanks,
    Carol

  • Group by on excluded column

    Hi Friends,
    We have created a report with privote table views with two view selctors and we excluded one columns (Product name). We are getting some worng results due to group by on Product name.
    Do we have option to elimnate the group by on Product name in the Physical query.
    Regards,
    Chandra.

    didn't understand your question properly..
    Are you using product name in one view and another view you're not using that column ??
    It shouldn't be a problem at all. try change aggregation rule to sum in pivot measures

  • Can we exclude column  from well configured streaming

    Hi Guys,
    Is it possible to exclude some columns from a table level replication?If yes , how ??
    Any help is highly appreciable.
    Thanks,
    Neels

    Hello,
    Yes you can using rules based transformations to exclude columns from LCRS.
    Depending on the version you can us Declarative Rule_Based Transformations as
    per
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14229/strms_transfom.htm#STRMS106
    or you could come up with an alternative if you are on an older version.
    Thanks
    Peter

  • How to hide columns in ALV? (via cl_salv_table)

    Dear forumers,
    Is there a way for me to hide a few columns (or data fields) from being displayed in the ALV table, using the cl_salv_table method?
    FORM display_data_alv .
      TRY.
          CALL METHOD cl_salv_table=>factory
            IMPORTING
              r_salv_table = o_table
            CHANGING
              t_table      = i_ro_assets.
        CATCH cx_salv_msg.
      ENDTRY.
      o_functions = o_table->get_functions( ).
      o_functions->set_all( abap_true ).
      o_columns = o_table->get_columns( ).
      o_columns->set_optimize( abap_true ).
      PERFORM set_columns.
      o_events = o_table->get_event( ).
      CREATE OBJECT o_handle_events.
      SET HANDLER o_handle_events->on_double_click FOR o_events.
      o_table->display( ).
    ENDFORM.                    " DISPLAY_DATA_ALV
    FORM set_columns .
      TRY.
          o_column ?= o_columns->get_column( 'BUKRS' ).
          o_column->set_long_text( text-008 ).
        CATCH cx_salv_not_found.
      ENDTRY.
      TRY.
          o_column ?= o_columns->get_column( 'ANLN1' ).
          o_column->set_long_text( text-009 ).
        CATCH cx_salv_not_found.
      ENDTRY.
    ENDFORM.                    " SET_COLUMNS
    I have also tried to exclude some columns from the subroutine SET_COLUMNS, but they are still showing in the resulting ALV table. What can I do here next?
    Appreciate any help here.
    Thanks very much.

    You can use the method SET_COLUMN_TECHNICAL of the class CL_SALV_COLUMN  to hide the Column.
    data:
      ir_columns type ref to cl_salv_columns_table,
      lr_column type ref to cl_salv_column.
      try.
          lr_column = ir_columns->get_column( 'MANDT' ).
          lr_column->set_technical( if_salv_c_bool_sap=>true ).
        catch cx_salv_not_found.                            "#EC NO_HANDLER
      endtry.
    Check the report SALV_DEMO_TABLE_COLUMNS to know more about the Column processing in SALV model.
    Regards,
    Naimesh Patel

  • Goldengate expects a column that is not in the unique constraint

    I do not know golden gate. I am working with a golden gate engineer who doesn't really know oracle. I am the DBA supporting this. This is the issue we are having. Please bare with me if I have trouble explaining it.
    I am pulling from oracle and loading to teradata. I confirmed that the unique index is correct in teradata (don't have access. I asked).
    Oracle 10.2.0.5
    golden gate: 11.1.1.0.29
    error: the name of the schema listed in the error is from teradata. So TERADATA_SCHEMA. represents that.
    Key column my_id is missing from update on table TERADATA_SCHEMA.MYTABLE
    Missing 1 key columns in update for table TERADATA_SCHEMA.MYTABLEbelow is a create table statement. I have altered table and column names. but the structure is the same.
    it does NOT have a primary key. It has a unique key. I am not allowed to add a primary key
    UNIQUE INDEX: UNIQUE_ID
    When we test an updates, golden gate is expecting MY_ID to be sent as well and golden gate abends
    The DDL below includes the partitioning/subpartition, unique index, and supplemental logging command that golden gate runs.
    I have also run the following 2 commands to turn on supplemental logging:
    ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
    ALTER SYSTEM SWITCH LOGFILE;
    CREATE
      TABLE MYTABLE
        "UNIQUE_ID"       NUMBER(10,0) NOT NULL ENABLE,
        "MY_ID"       NUMBER(10,0),
        "MYNUMBER" NUMBER(8,0),
        "TOTALNUMBER"  NUMBER(8,0),
        "USED" NUMBER(8,0),
        "LOTSUSED  NUMBER(8,0),
        "LAST_UPDATE_USER"  VARCHAR2(30 BYTE),
        "LAST_UPDATE_DATE" DATE,
        "MYDATESTAMP" DATE,
        "MYTYPE" NUMBER(2,0) NOT NULL ENABLE,
        "MYTHING"    CHAR(1 BYTE) NOT NULL ENABLE
      PARTITION BY RANGE
        "MYTYPE"
      SUBPARTITION BY LIST
        "MYTHING"
      SUBPARTITION TEMPLATE
        SUBPARTITION "MYTHING_X" VALUES
          'X'
        SUBPARTITION "MYTHING_Z" VALUES
          'Z'
        PARTITION "MYTHING1" VALUES LESS THAN (2) ,
        PARTITION "MYTHING2" VALUES LESS THAN (3) ,
        PARTITION "MYTHING3" VALUES LESS THAN (4) ,
        PARTITION "MYTHING4" VALUES LESS THAN (5) ,
        PARTITION "MYTHING5" VALUES LESS THAN (6) ,
        PARTITION "MYTHING6" VALUES LESS THAN (7) ,
        PARTITION "MYTHING7" VALUES LESS THAN (8) ,
        PARTITION "MYTHING8" VALUES LESS THAN (9) ,
        PARTITION "MYTHING_OTHER" VALUES LESS THAN (MAXVALUE)
    ALTER TABLE MYTABLE  ADD SUPPLEMENTAL LOG GROUP
    "MYGROUP_555"
      "UNIQUE_ID"
    ALWAYS;
    CREATE UNIQUE INDEX MY_IND ON MYTABLE  (
        "UNIQUE_ID"
      ;Edited by: Guess2 on Nov 3, 2011 12:57 PM
    Edited by: Guess2 on Nov 3, 2011 1:21 PM

    GoldenGate expects a primary key, a unique key, or a list of key columns.
    The addition of supplemental logging for the table can be done via SQL, but typically, it is done via the GGSCI interface:
    GGSCI 4> dblogin userid <your DB GoldenGate user>, password <your password?
    GGSCI 5> add trandata schema_owner.table_name
    How Oracle GoldenGate determines the kind of row identifier to useUnless a KEYCOLS clause is used in the TABLE or MAP statement, Oracle GoldenGate selects a
    row identifier to use in the following order of priority:
    1. Primary key
    2. First unique key alphanumerically with no virtual columns, no UDTs, no function-based
    columns, and no nullable columns
    3. First unique key alphanumerically with no virtual columns, no UDTs, or no function-based
    columns, but can include nullable columns
    4. If none of the preceding key types exist (even though there might be other types of keys
    defined on the table) Oracle GoldenGate constructs a pseudo key of all columns that
    the database allows to be used in a unique key, excluding virtual columns, UDTs,
    function-based columns, and any columns that are explicitly excluded from the Oracle
    GoldenGate configuration.
    NOTE If there are other, non-usable keys on a table or if there are no keys at all on the
    table, Oracle GoldenGate logs an appropriate message to the report file.
    Constructing a key from all of the columns impedes the performance of Oracle
    GoldenGate on the source system. On the target, this key causes Replicat to use
    a larger, less efficient WHERE clause.
    How to specify your own key for Oracle GoldenGate to use
    If a table does not have one of the preceding types of row identifiers, or if you prefer those
    identifiers not to be used, you can define a substitute key if the table has columns that
    always contain unique values. You define this substitute key by including a KEYCOLS clause
    within the Extract TABLE parameter and the Replicat MAP parameter. The specified key will
    override any existing primary or unique key that Oracle GoldenGate finds.>
    "I have altered table and column names. but the structure is the same."
    What column name did you alter?
    The source table table and target table are either identical, or there must be a source definition file created on the source and copied over to the target and referenced in the replicat.
    I don't see why my_id would cause a problem (based on what you posted), unless the tables are different.

  • How to convert row data into columns without using pivot table?

    Hello guys
    I have a report that has several columns about sales call type and call counts
    It looks like this:
    Calls Type Call Counts
    Missed 200
    Handled 3000000
    Rejected 40000
    Dropped 50000
    Now I wanna create a report that look like this:
    Missed call counts Handled Call counts Rejected Counts Drop counts Other Columns
    200 300000000 40000 50000 Data
    So that I can perform other calculations on the difference and comparison of handled calls counts vs other call counts..
    I know pivot table view can make the report look like in such way, but they cant do further calculations on that..
    So I need to create new solid columns that capture call counts based on call types..
    How would I be able to do that on Answers? I don't have access to the RPD, so is it possible to do it sololy on answers? Or should I just ask ETL support on this?
    Any pointers will be deeply appreciated!
    Thank you

    Thanks MMA
    I followed your guidance and I was able to create a few new columns of call missed count, call handled counts and call abandoned counts.. Then I create new columns of ave missed counts, ave handled counts and so forth..
    Then I went to the pivot view, I realized there is a small problem.. Basically the report still includes the column "call types" which has 3 different types of call "miss, abandon and handled". When I exclude this column in my report, the rest of the measures will return wrong values. When I include this column in the report, it shows duplicate values by 3 rows. It looks like this:
    Queue name Call types Call handled Call missed Call abondoned
    A Miss 8 10 15
    A Handled 8 10 15
    A Abandoned 8 10 15
    in pivot table view, if I move call type to column area, the resulted measures will become 8X3, 10X3 and 15X3
    So is there a way to eliminate duplicate rows or let the system know not to mulitply by 3?
    Or is this as far as presentation service can go in terms of this? Or should I advice to provide better data from the back end?
    Please let me know, thanks

Maybe you are looking for

  • Nomad Jukebox Zen Xtra 60 GB can't be found through Mediasource Organizer

    I have been using the Creative Nomad Jukebox Zen Xtra HDD Player since a few years and I have always been satisfied. But recently, I had a massi've computer problem, forcing me to do a complete re-install of Windows XP, without the chance to backup m

  • My computer and itunes does not recognise my ipod nano

    I had to return a faulty ipod nano. The replacement isn't recognised in My Computer or in iTunes. I think this might be to do with the registration of the first nano still being recognised? I have reinstalled itunes and followed the 5R's in the manua

  • Safari not rendering a page correctly

    A webpage I created in Dreamweaver uses drop down menus that are supposed to display just to the left of the link they drop from. In all other browsers they work correctly, but since the latest upgrade in Safari to 3.0.4 as a part of OS 10.4.11 on my

  • Spaces between words in a word document deleted

    in a word document 2010, I found all the words with spaces. Suggestions?

  • Email  getting truncated in SOST

    Dear SRMer's, System Information : SRM4.0 As part of the business requirement, our email address in SRM need to be a max length of 100 characters. When testing by creating a shopping cart and adding an approver with a 100 character length email,  in