Adding columns to a view

Hi, I have a column with values separated by commas in a table
e.g. (SER = 12, Aid = por...)

I wrote a function to divide the comma preceding separated values and is not a problem

Finally, I have to create columns in a view (SER and ASSISTANCE) and add the corresponsing values in column (12, POR).

Is it possible to create a view from above the requirement. If Yes please let me know how we can do it, otherwise please give other options of alternative if you have.

Well that depends on some other things.
Maybe the substr function will do for you.

SQL> select * from abc_t;

CONC
--------------------------------------------------------------------------------
SER=12,AID=POR

SQL> select substr(conc,5,2) as SER,substr(conc,12,3) as AID from abc_t;

SER      AID
-------- ------------
12       POR

SQL> create view the_view as select substr(conc,5,2) as SER,substr(conc,12,3) as AID from abc_t;

View created.

SQL> select * from the_view;

SER      AID
-------- ------------
12       POR

SQL>

Tags: Database

Similar Questions

  • Newly added column is not displayed in the interactive report

    Hello

    I have a tableA with 3 columns. In the application I view as form with region as interactive report (Oracle 10 g Application Express 3.2) report.

    I added a column for tableA.Now when I'm refreshing the report by adding this column in the select query, the new added column is not displayed in the application.

    How can I do this so that the added column can be displayed. I don't want to delete it all and do it again.

    Thank you
    Siya

    Hello

    Run the application and select the columns in the report menu interactive action.
    Save the layout by default if you always see these columns

    BR, Jari

  • Newly added column is reflected only not in interactive report.

    Hello


    I created a report of iteration by using the APEX Wizard, later I changed the table of database of IR to have a new column to capture other data. Now I want to show the newly added column in IR to achieve this, I modified the region of origin (that is, the SQL query) of the IR newly added column is not automatically get reflected in IR, but when I run the page.

    Can someone help me .



    Thank you

    Hello

    It is here:

    concerning

    J

  • change the data type of column in a view

    Hi gurus,

    Please suggest.


    I have been created as below in the region of production.

    CREATE OR REPLACE TYPE PROD. (OBJECT) ACE FEATURE_CUSTOM_LIST_OBJ
    TERMINAL_FEATURE_ID NUMBER (8).
    DATA_VALUE NUMBER (8)
    );
    /


    And the view is created below the base have the PROD. FEATURE_CUSTOM_LIST_OBJ

    CREATE OR REPLACE FORCE VIEW PROD. TERMINAL_FEATURE_TYPE
    (
    TERMINAL_FEATURE_ID,
    DATA_VALUE
    )
    AS
    SELECT
    TERMINAL_FEATURE_ID,
    DATA_VALUE
    TABLE)
    CAST)
    PROD. TERM_RELATED_REF_DATA. GET_TERMINAL_FEATURE_TYPE AS PROD. FEATURE_CUSTOM_LIST_TAB));

    Examples of data must be inserted into the display

    TERMINAL_FEATURE_IDDATA_VALUE
    120
    121
    123
    11THERE
    11N

    If iam thinking is possible that we can change the data type of number of varchar2 data type column in a view?

    Or should I follow create or replace type as whenevr the nonnumeric data tries to bring into view
    sound by giving the number plsql for digital character conversion error since it is a number of data type here.

    I have been created as below in the region of production.

    CREATE OR REPLACE TYPE PROD. (OBJECT) ACE FEATURE_CUSTOM_LIST_OBJ

    OK - but it is a SCALAR - not a collection object

    And the view is created below the base have the PROD. FEATURE_CUSTOM_LIST_OBJ

    CREATE OR REPLACE FORCE VIEW PROD. TERMINAL_FEATURE_TYPE

    No - it isn't. Your type of object is a SCALAR - not a collection. You need create a view on a table or a collection that is treated as a table.

    DDL perspective you posted doesn't even mention your FEATURE_CUSTOM_LIST_OBJ.

    If iam thinking is possible that we can change the data type of number of varchar2 data type column in a view?

    Have you tried using TO_CHAR to format the number as a string?

  • How to list the columns for a view

    Dear experts

    I know how to list the columns in a table. This easy by querying the data USER_TAB_COLUMNS dictionary.

    But my problem is how to issue a query that returns the columns for a view?

    Thanks in advance

    USER_TAB_COLUMNS stores the metadata for both views.

    Select * from user_tab_columns where table_name = 'YOUR_VIEW_NAME"of order of column_id.    -Replace with your view_name (mandatory course)

    See you soon,.

    Manik.

  • Retrieve the metadata for a column in a view

    Hello

    I can see how it is possible to retrieve the details of all the columns of a table by querying the views sys.tables and sys.columns . Is there a similar way to retrieve the details of all columns in a view?

    Thank you
    Ben

    I am not afraid. Currently, TimesTen code to display information in an internal proprietary format in the system catalogs.

    I'm sorry.

    Chris

  • Column definition for a specific column in a view

    Is it possible to query the metadata for the definition of a column in a view? I can see the full DDL for USER_VIEWS view. TEXT and I can see the USER_TAB_COLUMNS column to give the type of data etc. However, what I'm looking for is the DDL that defines a specific column.

    So, taking into account:
    create table (PERSON)
    SSN VARCHAR2 (12),
    FIRST NAME VARCHAR2 (25).
    VARCHAR2 (25) LAST_NAME,.
    STREET VARCHAR2 (40),
    CITY VARCHAR2 (30),
    STATE VARCHAR2 (30),
    ZIP VARCHAR2 (15).
    COUNTRY VARCHAR2 (35))

    create view PERSON_VW as
    Select SSN,
    FIRST NAME,
    LAST_NAME,
    FIRST_NAME. ' ' || LAST_NAME FULL_NAME
    of the PERSON

    I expect that the query may look like:
    Select the DDL from metadata where table_name = 'PERSON_VW' and column_name = "FULL_NAME".
    and the result would be: "PERSON. FIRST_NAME. ' ' || NO ONE. LAST_NAME '.

    or select the DDL from metadata where table_name = 'PERSON_VW' and column_name = 'first name '.
    and the result would be: "PERSON. FIRST NAME. "

    Thank you!

    >
    What I really want to know, is that the definition of the customer includes all columns that are not the same basis, if the column names are the same.
    >
    As already said Oracle does not store the column definitions separately only the base query and an alias column metadata.

    If you select the column of TEXT of ALL_VIEWS, it will give all of the query.

    And the DBMS_METADATA also includes the query as well as aliases for columns

    select dbms_metadata.get_sxml('VIEW', 'PERSON_VW', 'SCOTT') FROM DUAL
    
      
       SCOTT
       PERSON_VW
       
          
             SSN
          
          
             FIRST_NAME
          
          
             LAST_NAME
          
          
             FULL_NAME
          
       
       select SSN,
    FIRST_NAME,
    LAST_NAME,
    FIRST_NAME || ' ' || LAST_NAME FULL_NAME
    from PERSON 
    
    

    Even by comparing the hash value of two-point plan view does still not detect some differences.

    For example, your point of view and a modified to generate the same hash value of plan even thought the resulting column is longer in the second definition of the view

    1. create a view
    2 create a slightly modified view
    3 run each view - SELECT * VW
    4. compare the hash of Plan values.

    First point of view is yours

    create or replace view PERSON_VW as
    select SSN,
    FIRST_NAME,
    LAST_NAME,
    FIRST_NAME || ' ' || LAST_NAME FULL_NAME
    from PERSON
    

    second point of view is slightly different and includes ten slots instead of one in the concatenated field

    create or replace view PERSON_VW1 as
    select SSN,
    FIRST_NAME,
    LAST_NAME,
    FIRST_NAME || '          ' || LAST_NAME FULL_NAME
    from PERSON
    

    The SELECT * VW used in two different sql * more sessions show the same hash value of the plan.

    So don't know anyway to compare the way you want because oracle does not store the definitions of column separately.

  • REF CURSOR as a column in a view

    Dear all,

    Can we use a slider ref as one of the columns in a view.

    Receive your answer.

    Thank you
    Madhu K.

    Not that I am aware, no. While you can select a cursor in a column

    select deptno,
           cursor( select *
                     from emp e
                    where e.deptno=d.deptno ) emp_cur
      from dept d
    

    If you try to create a view using this instruction, you will get an error

    SQL> ed
    Wrote file afiedt.buf
    
      1  create or replace view vw_dept_empcur
      2  as
      3  select deptno,
      4         cursor( select *
      5                   from emp e
      6                  where e.deptno=d.deptno ) emp_cur
      7*   from dept d
    SQL> /
           cursor( select *
           *
    ERROR at line 4:
    ORA-22902: CURSOR expression not allowed
    

    I would be very curious, though, what problem you are trying to solve. Choose a slider as a column in a query is extremely rare to do. So, I would tend to believe that you can address the problem more effectively.

    Justin

  • What is the LAST_ACTIVE_TIME column in the view v$ sql

    Hello

    I use the Oracle 10.2.0.3 version.

    I have a doubt in v$ sql.

    What is the meaning of the LAST_ACTIVE_TIME column in the view v$ sql?

    I assume that this is the last time when this SQL has been executed in the database. M I right?

    According to the docs of Oracle, its definition is as below.

    LAST ACTIVE_TIME - time in which the query plan was last active. _

    Thanks in advance.

    Best regards
    oratest

    Please also refer to the following link;

    http://dbaspot.com/forums/Oracle-tools/5153-how-get-SQL-commands-executed-Oracle-database-certain-period.html

    +"+
    + If you look at gv$ sql, you'll see a column named LAST_ACTIVE_TIME. +
    + Which will give you the last performed time. +
    +--+
    + Daniel Morgan +.
    +"+

    Hope that helps.

    Ogan

  • Hide a column in a view, but show in other

    Hi all.
    I need to hide a column in the view of the 'Table', but the column should appear on the "PivotTable".
    I know we can hide pivot (exclude) and show on table, but I want to know if the opposite is possible.

    This is necessary because I do a selector to display for writeback. And I don't want to see all the columns to writeback table mode. But he needs to be there on the PivotTable.
    Please let me know if it is possible.
    Thank you.
    Vinay

    Yes, we can do that.

    Extend the check on the 'skin' in the tab formatting of column you want to display in the table.

    Now, duplicate, the same view and in the pivot table column initially you will not see the displayed column.

    Now in the properties check on "hidden" in the "topics"format"and you won't see her again and now uncheck the 'hidden' and shoud you will see the column displayed in the pivot view"

    This way, you will have the column hidden in the table view and displayed in the PivotTable.

    It may be useful
    Prash

  • How to make added columns to be visible by default in the interactive report?

    Hello

    I added two columns of an interactive report.
    When I run the page, added columns are not visible.
    Then I made them visible through the option "select columns".
    But next time when I connect to those two columns are still invisible.
    How can I make either added columns visible by default in the interactive report?

    Thank you
    Guy

    I had this problem: you must run the report as a developer and include the option "actions." Then, when the report as you want (ie: you change when executing it) use the Action save to save the default layout. You then see this return in the development environment and that's what it's going by default for users.

    I hope at least that's the answer!

    Kind regards
    Steve

  • Need help adding 'description' field of view for clips in bin

    I'm buried in confusion right now trying to learn Metalogging. Videos showing the older versions of the first show that there a "third party" field in the thumbnail view of clips in the tray where a short descriptive text can be added. I clicked the menu flying in the version of cs6 in the project panel where I have clips showing in thumbnail view and I've checked and unchecked about everything in the choice of metadata display and nothing changes in the thumbnail view when I go back to the window project and bin.

    Is it possible to add a summary in the thumbnail view field? I don't see columns to achieve either in list view. Also, I don't see all the fields where I can click on and edit existing fields.

    I'm done, watched no informative videos on the internet about it, many who do not apply to the CS6, here is my last hope.

    I would be grateful for links to relevant videos, description or any help on what seems to be a very useful to work with Premiere Pro, neighborhood, but I'm not able to penetrate so far.

    TIA,

    Ken

    Only in the view of the list.

  • I updated itunes to 12.4.0.119 and now find under the column of the view may not display the duplicate songs

    I have updated itunes to 12.4.0.119 and now impossible to find in the duplicate songs of column - the view

    I had the same problem, but a solution was found in another forum:

    Once more, Apple settled things. It is now at...

    file/library/show-duplicate-items

    These guys are worse with each update iTunes

  • How can I delete the column work in 'view as Playlist "?

    In iTunes 12 for Windows, I consult a reading list, and in the iTunes menu bar, I chose Visualiser\Mode as playlist.

    It gives me a numbered list of the tunes in the playlist, but for each song in the playlist, I always get a box useless art with a note of music in there.

    How can I remove this unwanted column 'field work' from this point of view?

    I already did what follows, to remove all the illustrations in iTunes:

    (1) I deleted all of my entire library of music art.

    (2) in Library\Songs, I have selected the Display Options and have disabled 'Art Show'.

    (2) in Library\Songs, I have selected the Display Options and have disabled 'Art Show'.

    Auto

    You must uncheck this box especially for the Playlist you are viewing.

  • How to change the width of key column when you view files in the Explorer window?

    Can someone help me with this one major annoyance I have with Vista?

    I opened an Explorer window and I want to resize the first column, so I can see the full file name.  (First I accidentally spend whole column name because I can't seem to find my mouse to keep the resizing grabber.)   Now that I have the desired column width, is it possible to make the column width by default for all future Explorer Windows I open?   I've grown very tired of having to resize this column whenever I open an Explorer window.

    Thank you!

    CTRL-click this link to read a thread of responses on increasing you the Vista folder settings memory.

    My user folder moves around:

    Here's another on a good tutorial

    View of folders:

    Messages rating helps other users

    Mark L. Ferguson MS - MVP

Maybe you are looking for

  • Software for STOR. E CANVIO 3.5 3 TB black & white number of room: HDWC130EW3J1

    HelloI just bought STOR. E CANVIO 3.5 3 TB black & white number of room: HDWC130EW3J1The hard drive contained software files and installation for backup and encryption EZ. Unfortunately, I have formatted the drive and lost everything. Could someone p

  • Satellite A660-1EK - mechanical noise from the HARD drive

    HelloFirst sorry for my English. Satellite A660-1EK, I bought 5 days ago. Its work perfect but I heard a noise of laptop 3 days ago and I still hear it 1 time in 3-4 hours. I think its coming from HARD drive because it's a mechanic. Its audience like

  • Received a call from a company on the alleged virus activity, is it a scam?

    I got a phone call from a company calling itself the MSIT Experts saying that they have detected the activity of the virus on my computer, citing my name and address, which they say has been provided by Microsoft.  Someone at - he heard of these peop

  • What is the removable storage management?

    I just checked the "turn windows features on or off" and I noticed that the "removable storage management" is turned OFF. I used a hard drive portable USB and flash drives since I have this computer without problem. What does the "removable storage m

  • DMVPN PNDH question

    I have a phase 2 network with routers spoke about 40 and routers DMVPN hub double. 90% of this works very well. However, I have 3 or 4 of the spoke routers that are unable to communicate with each other directly (traffic is via the router hub between