Create a view, some of the columns default are NULL

Windows XP/10g 10.2.0.1.0
I have a table tab1(test1, test2, test3)
And, I need to create a views as:
create or replace VW1(test1, test2, viewtest1, viewtest2) as (select test1, test2, viewtest1, viewtest2 from tab1, dual);
And need the column value viewtest1 and viewtest2 to be default as null.
Thanks.

Are you looking for something like this ?
create or replace VIEW VW1(test1, test2, viewtest1, viewtest2) as
         (select test1, test2, NULL, NULL from tab1);

Similar Messages

  • Creating a view with existing GeoRaster columns and new SDO_GEOMETRY column

    Hi,
    In a nutshell, I already have 1 real table, which has several attributes including types such as text, numbers etc. but also a GeoRaster column. This table works great, has its metadata stored properly and is spatially indexed; no worries.
    I am then creating a view based on the above mentioned table, including the GeoRaster column. This worked, no problems. However now I want the same view to also have a SDO_GEOMETRY column which explicitly stores the spatial extent for each GeoRaster. Note the original table does not have this SDO_GEOMETRY column. So, I have created a revised SQL statement to create the view, but now it dynamically adds a new column and puts the GeoRaster.spatialextents into the SDO_GEOMETRY column.
    This worked, the data made it into the view, but when we try to view the SDO_GEOMETRY in a viewer, we get errors. I added a system metadata entry for the view, but this did not help. Also, it is not possible to spatially index a view so I knew that was not the problem.
    I think what has happened is the SDO_GEOMETRY column is in a sort of "limbo", where because it was not contained in the original table (and indexed there) and it is not able to be indexed in a view, it cannot be manipulated/viewed/used spatially.
    Here is a snippet describing the original table:
    "IMAGERY_ID" NUMBER NOT NULL ENABLE,
    "CAM_ANGLE_X" NUMBER,
    "CAM_ANGLE_Y" NUMBER,
    "CAM_ANGLE_Z" NUMBER,
    "SPEED" NUMBER,
    "HEADING" NUMBER,
    "IMAGE_GEOR" "SDO_GEORASTER",
    "ACQUISITION_TIME" TIMESTAMP (6),
    "SENSOR_ID" NUMBER,
    "DOWNWARD_LOOKING" CHAR(1 BYTE),
    "ORG_ID" NUMBER,
    "POC_ID" NUMBER,
    "FILE_NAME" VARCHAR2(100 BYTE),
    "CORRELATION_ID" VARCHAR2(256 BYTE),
    And here is the statement I used to create the new view:
    CREATE VIEW level_0_img_view (imagery_id, cam_angle_x, cam_angle_y, cam_angle_z, speed, heading, image_geor, acquisition_time, sensor_id, downward_looking, org_id, poc_id, file_name, correlation_id, geor_extents)
    AS
    SELECT a.imagery_id, a.cam_angle_x, a.cam_angle_y, a.cam_angle_z, a.speed, a.heading, a.image_geor, a.acquisition_time, a.sensor_id, a.downward_looking, a.org_id, a.poc_id, a.file_name, a.correlation_id, a.image_geor.spatialextent
    FROM imagery a
    WHERE a.file_name LIKE '%.lev0';
    Note in the above statement that the "geor_extents" column is the new column added dynamically (and not in the original table). Note the new column with the SDO_GEOMETRY data is flawless, I have looked at the records in SQL developer and all the data is there.
    Any ideas?
    In case you're wondering, I do have reasons for: (i) wanting an explicit column with the SDO_GEOMTRY (serving via WFS), and (ii) not wanting to alter the original table to include the equivalent SDO_GEOMETRY column.
    Cheers,
    M.

    Hi,
    if you are having problems to display your view spatial columns in MapBuilder/MapViewer, you may be missing to register the view information in the metadata (name and spatial columns).
    For example, lets see the following table that simulates your case:
    SQL> desc pci_image;
    Name Null? Type
    GEORID NOT NULL NUMBER
    TYPE VARCHAR2(32)
    GEORASTER MDSYS.SDO_GEORASTER
    -- create a view
    create view pci_img_view (georid,georaster,geor_extents)
    as
    select a.georid,a.georaster,a.georaster.spatialextent
    from pci_image a;
    -- register metadata for view spatial columns (GeoRaster and geometry column)
    insert into user_sdo_geom_metadata
    select 'PCI_IMG_VIEW','GEORASTER.SPATIALEXTENT', diminfo, srid
    from user_sdo_geom_metadata where table_name = 'PCI_IMAGE'
    insert into user_sdo_geom_metadata
    select 'PCI_IMG_VIEW','GEOR_EXTENTS', diminfo, srid
    from user_sdo_geom_metadata where table_name = 'PCI_IMAGE'
    There is no need to index the spatial columns if they have been indexed before.
    Now, if you go in MapBuilder you should see the the view name in the list of geometry tables, and be able to create a theme on column GEOR_EXTENTS (select it on the combo box) and to preview it.
    For the GeoRaster column, currently the view name is not shown on the list of GeoRaster tables in MapBuilder.
    For GeoRaster data, MapBuilder uses the contents of metadata view user_sdo_geor_sysdata, and then it would be needed to register the view contents there. We will talk with Jeffrey to check if there is any problem in registering
    view contents in this metadata view. If the view name and georaster column is registered in user_sdo_geor_sysdata,
    then it should show in MapBuilder. But you can still create a GeoRaster theme for this view using a SQL command, and should be able to preview it in MapBuilder.
    -- create a GeoRaster theme based on view Georaster column.
    insert into user_sdo_themes values (
    'PCI_IMAGE_V_GEOR',
    'View of georaster column',
    'PCI_IMG_VIEW',
    'GEORASTER',
    '<?xml version="1.0" standalone="yes"?>
    <styling_rules theme_type="georaster" raster_id="1" raster_table="RDT_PCI" raster_bands="0,1,2">
    </styling_rules>');
    -- commit changes
    commit;
    Joao

  • Hiding some of the columns in Graph in WAD

    Hi Friends
    In WAD, Ive created a WAD template with a Drop down box ,table and graph all with 1 data provider ( since the char value selected in drop down box has to be effected the data of table and graph) and working fine.
    I would like to hide some of the columns in the graph . I ve tried all the properties of the graph but I didnt get.
    The columns which I dont want to see in graph are required in the table . So Ive not Hided them in Query (DP of all web items).
    Which Property I ve to use to hide some of the columns in graph only.
    Plz help me in this
    Thanks in advance

    Hi Sai,
    You can go the web item properties (chart) and you can avoid the column in 'Set the sample data' of Texts and Data Selection step(2) of Chart wizard you can check out the 'Category' option to increase of decrease you visibility of the columns.
    Also check with the series option in the same wizard.
    Hope this will suffice your requirement.
    Regards,
    Madhu

  • How to suppress a complete row when some of the columns are blank

    Hello,
    is it possible to suppress an entire row in the BEx Report where some of the columns contain no values. The report is in BW 3.5 version and is opened in the web browser. It contains only characteristics in the ROWS area of BEx Designer.
    Pls help. Thanks.
    SD

    Hi,
    You can wirte a condition on any keyfigure stating that KF1 > 0.So once that condiiton is active and if any column is blank then it will not display it.
    Pelase check out this link as well.
    http://help.sap.com/saphelp_nw04/helpdata/en/a4/dd3841d132d92be10000000a1550b0/content.htm
    Hope it helps.
    Regards,
    AL

  • Pivot Some of The Columns to Rows

    Hi,
    I need to pivot some of the columns to rows and have the remaining columns in the result.
    At this point I have already done a subquery to gather data and to keep the run time down I'd rather not do it again like a UNION would require.
    Single Row
    CUST TEST_DATE TEST_TYPE1 TEST_TYPE2 TEST_TYPE3
    1 20-MAR-09 AA BB CC     
    Result Rows
    CUST TEST_DATE TEST_TYPE
    1 20-MAR-09 AA
    1 20-MAR-09 BB
    1 20-MAR-09 BB
    Suggestions please?
    Thank You in Advance for Your Help,
    Lou

    with t as (
               select 1 cust,to_date('20-MAR-09','dd-mon-yy') test_date,'AA' test_type1,'BB' test_type2,'CC' test_type3 from dual
    select  cust,
            test_date,
            case lvl
              when 1 then test_type1
              when 3 then test_type2
              else test_type3
            end test_type
      from  t,
            (select level lvl from dual connect by level <= 3)
      order by cust,
               test_date,
               test_type
          CUST TEST_DATE TE
             1 20-MAR-09 AA
             1 20-MAR-09 BB
             1 20-MAR-09 CC
    SQL> SY.

  • Error when attempt to open Photoshop in Windows Vista, "Some of the application components are missi

    Using Windows Vista-32. Installed CS4 suite & used Photoshop and other components but randomly one day it stopped working. Clicked to open and received error, "Some of the application components are missing from the application directory, Please reinstall the application."
    I uninstalled & reinstalled entire Suite and just Photoshop several times with no success. When I reinstall, I receive error message,
    Adobe Photoshop CS4 English Language Pack
    Error:
    Error 2.
    LangPack (English) for DeviceCentral
    Error:
    Error2.
    Solutions I have used include:
      -  replacing System Color Profile library by creating a different folder on desktop...
      -  replacing Backup Key for Adobe CS4
      -  Administrators & System are listed & permissions for security are set to Full Control
    PLEASE HELP! I have assignment Due Tomorrow & Can't Access Software I PAYED Big $$$$ FOR!
    Phone support won't help w/o paying a fee???

    You've done something to your system, or it's possibly gotten a malware infection.
    You can't even reinstall Photoshop?  Have you tried completely removing it, including running the Creative Suite Removal script? 
    How recently did it work?  Have you tried System Restore?
    -Noel

  • Some of the error idocs are not falling into Workflow Inbox

    The extract of IDOC list with status 51 from WE02 transaction is not matching with Workflow inbox column "object", some of the idocs which are errored are not showing in the workflow inbox. Here we are in need to get all the errored idocs into the inbox. Please suggest me to proceed further.

    Hi Smita,
    Thanks for your reply.
    I have maintained the suggested role SAP_GRC_SPC_SCHEDULER in backend for an user id and i can able to see a job is getting completed in SM37.
    However, the task in the inbox hasnt come yet.Any idea you may have as to how much time it will take for task to come into inbox.Or is that i need to do any more extra task.
    Please advice.
    Thanks
    Ashok S

  • HT4847 my backup file is too big?  how can i change some of the items that are being backed up to decrease size?

    my backup file is too big?  how can i change some of the items that are being backed up to decrease size?

    In iPhoto, Select All the Photos you want to move... Then goto  > File > Export >
    Choose the settings as seen here
    Click Export and select your External Drive
    Best to create a Folder to put them in... and away you go...

  • Open in Photoshop CS5 errors with "Some of the application Components are Missing...

    After doing a migration from one mac to another mac with the Migration Assistant,  when I try to edit a lightroom file with the Open In CS5 I get a dialog that comes up "Some of the application Components are Missing from the Application directory, Please reinstall the application.
    Well I have reinstalled photoshop, actually uninstalled it first, the reinstalled twice...once with "keep preferences" and once without.  I have also run the Adobe Upgrader and everything is up to date.  Lightroom is up to date.
    Any ideas??

    Since you can open a photo in CS5 when selecting <Open anyway>, I would also think that this is a problem of Lr.
    When you select <Render using Lightroom> Lr creates the PSD (or TIFF) and sends it to CS5.
    So it seems that this part of Lr that is creating a PSD (or TIFF) from your Raw image is missing / broken.
    Most probably something got left behind when you used the Migration Assistant.
    I would suggest this: Download from Adobe's website the trial version of Lr 4.3. The trial version is a full version with all features enabled, but it runs only for 30 days.
    Each time you open the trial version you get the option <I want to buy>. Select this option and enter your serial number. This will unlock the trial version for unlimited use.
    Maybe it would be good to un-install your current Lr before re-installing the downloaded file to ensure that you do a "clean" re-installation.

  • "Freeze/Unfreeze" and "New View" buttons of the Structure window are gone

    Hello everyone!
    I'm using jDev 11.1.2.1.0 and for quite some time now I realized the "Freeze/Unfreeze" and "New View" buttons of the Structure window are gone.
    Have they moved or hide somewhere else, or they are gone for good?
    Thanks a lot
    ~apostolos

    Looks like this has been intentionally done
    Eliminate Freeze & New View (also in PI). These options were confusing users and for those who understood them found them not very usefulCourtesy - http://www.oracle.com/technetwork/developer-tools/jdev/jdev-11gr2-nf-404365.html.
    I'm not really sure though what you need to do if you actually need those features

  • Hi. After I have loaded a picture into Photoshop some of the menu tools are greyed out and I cannot use the keyboard short cut, for instance I cannot use Ctrl   T to enter free transform mode. Also the toolbar is so small I cannot see the icons without ge

    Hi. After loading a picture into Photoshop some of the menu tools are greyed out and I cannot use the keyboard short cuts, for instance I cannot use Ctrl + T for free transform, how do I resolve this problem. In addition the tool Icons are so small I have to get close to the screen to see them, is there anyway the Icons can be made bigger without reducing the resolution of the screen.
    Thanks
    Derek

    Are you working on a background layer? If so, Ctrl + T will not work. Press Alt and double-click your background layer to convert to a normal layer (or right-click BG layer and select Layer from Background) and try again.
    If you're working in Photoshop CC 2014 you can go to Preferences > Experimental Features and tick "Scale UI 200% for high-density displays" to make your buttons and icons larger.

  • In iTunes on my windows 7 PC, the Edit/Preferences dropdown window,some of the tab windows are not large enough to see all options that are available.  The borders of the window cannot be draged larger.  As a result, I can not uncheck or check some box's.

    In iTunes on my windows 7 PC, in the Edit/Preferences dropdown window,some of the tab windows are not large enough to see all options that are available.  The borders of the window cannot be draged larger.  As a result, I can not uncheck or check some box's on several of the preferences pages.  The Apple people at the store did not help.  I have lownloaded the latest version of iTunes and this is still an issue.  HELP.

    Is there really nobody else with this problem? Really?

  • PS CS4 64-bit (in Web Premium CS4) on Win 7 PC.  I did a duplicate file check on my hdd and deleted dup files. Now I get "Some of the application components are missing from the Application directory, Please reinstall.."

    PS CS4 64-bit (in Web Premium CS4) on Win 7 PC.  I did a duplicate file check on my hdd and deleted dup files. Now when I try to run PS 64-bit I get "Some of the application components are missing from the Application directory, Please reinstall the application." When I do this, it seems to install correctly until the very end, then it says "Installation Complete With Errors", and when I try to run I get the same 'component missing message'. What can I do? PS 32 bit runs fine. Some of the other applications ib Web Premium say the shortcut has been changed or removed. I appreciate your help...Thank you

    Best advice I can think of is to uninstall and run the Clean Script from here.
    Adobe - Adobe CS4 Clean Script

  • I receive an error message that some of the application components are missing when trying to open Photoshop CC 64-bit

    Hi,
    I'm using Windows 8.1 and I can see photoshop CC 64 bit. But when I'm launching it, it throws an error "Some of the application components are missing from the Application directory, Please reinstall the application". I've reinstalled twice but getting the same error. Whereas the 32 bit application works fine. Any help?

    Branching this to a new discussion.
    Govinda_s13 are you still receiving the error messages referenced above?

  • Itunes cannot run because some of the required files are missing?

    This morning when I turned on my computer my itunes was suddenly not working. When I double click the desktop icon to open it up, I get an error message that reads:
    iTunes cannot run because some of the required files are missing. Please reinstall iTunes.
    I searched the FAQ archive and still cannot find an answer to my problem.
    THe last part of the error message says to reinstall itunes, but I cannot even get the corrupt version off. Is there anyway to save the music I have on here? Another user and I have separate iTUnes music, so a great deal of music will be lost, including things recently purchased.

    Thank you so very much. I don't know why I didn't think of that but it is up and running fine now

Maybe you are looking for