Oracle view fields metadata

I want to query what fields oracle database view has, which query i should use?
I don't see the information in those tables:
SYS.obj$ o, SYS.view$ v
This query seems to show only table fields:
select * from DBA_TAB_COLUMNS
but i like to see a view fields.
Edited by: CharlesRoos on Mar 30, 2009 8:06 AM
Oh, sry, the information si stil lthere:
select * from DBA_TAB_COLUMNS c
where c.TABLE_NAME = 'ALL_VIEWS'
This topic can be deleted then i think, i got answer. Sry.
Edited by: CharlesRoos on Mar 30, 2009 8:08 AM

You can just simply type:
SQL> DESC view_name
when you use SQL*Plus, that is.
You can also query f.i. USER_TAB_COLUMNS.
Edited by: hoek on Mar 30, 2009 5:07 PM

Similar Messages

  • Include autoincrement field in oracle view

    Hi,
    i need to include autoimcrement field in oracle view. I know that sequence is not permitted there.
    Is there any other way to have autoincrement field in view?
    Thanks in advance.
    Dominik

    If you are using view for query purpose only, you can use ROWNUM.
    select rownum,columns from myview

  • ORA-02070: Error when updating a SQL Server table thru an Oracle View

    I have a SQL Server table TIMESHEET which contains a number of VARCHAR and NUMERIC columns plus a DATETIME column.
    Only the DATETIME column is giving me trouble.
    On the ORACLE side I have a view which selects from the SQL Server table but in order to get the SELECT to work, I had to either put a CAST or TO_DATE function call around the DATETIME field
    Below is the relevant part of the 2 view definitions I have tried
    create view TIMESHEET as
    SELECT
    "TsKeySeq" as TS_KEY_SEQ,
    "EmployeeNo" as EMPLOYEE_NO,
    CAST("PeriodEnding" AS DATE) as PERIOD_ENDING,
    . . . (more columns - not relevant)
    FROM [email protected];
    An update to the view generates this message
    ORA-02070: database OLEMSQLPSANTDAS6 does not support CAST in this context
    create view TIMESHEET as
    SELECT
    "TsKeySeq" as TS_KEY_SEQ,
    "EmployeeNo" as EMPLOYEE_NO,
    TO_DATE("PeriodEnding") as PERIOD_ENDING,
    . . . (more columns - not relevant)
    FROM [email protected];
    An update to the view generates this message
    ORA-02070: database OLEMSQLPSANTDAS6 does not support TO_DATE in this context
    If I don't include either the TO_DATE() or CAST() then I get
    Select Error: ORA-28527: Heterogeneous Services datatype mapping error
    ORA-02063:preceding line from OLEMSQLSANTDAS6
    Does anyone have any idea how to update a SQL Server DATETIME column thru an ORACLE view?

    You can't cast accross heterogenious databases and there is no need to. HSODBC treats SQL Server DATETIME column as DATE. For example, I have SQL Server table:
    CREATE TABLE [Ops].[T_JobType](
         [JobType] [varchar](50) NOT NULL,
         [JobDesc] [varchar](200) NULL,
         [InsertDt] [datetime] NOT NULL CONSTRAINT [InsertDt_00000006]  DEFAULT (getdate()),
         [InsertBy] [varchar](128) NOT NULL CONSTRAINT [InsertBy_00000006]  DEFAULT (user_name()),
         [LastUpdated] [datetime] NOT NULL CONSTRAINT [LastUpdated_00000006]  DEFAULT (getdate()),
         [LastUpdatedBy] [varchar](128) NOT NULL CONSTRAINT [LastUpdatedBy_00000006]  DEFAULT (user_name()),
    CONSTRAINT [T_JobType_PK] PRIMARY KEY CLUSTERED
         [JobType] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 100) ON [DATA01FG]
    ) ON [DATA01FG]Now on Oracle side I do:
    SQL> desc "Ops"."T_JobType"@pbods
    Name                                      Null?    Type
    JobType                                   NOT NULL VARCHAR2(50)
    JobDesc                                            VARCHAR2(200)
    InsertDt                                  NOT NULL DATE
    InsertBy                                  NOT NULL VARCHAR2(128)
    LastUpdated                               NOT NULL DATE
    LastUpdatedBy                             NOT NULL VARCHAR2(128)
    SQL> select "InsertDt" from "Ops"."T_JobType"@pbods;
    InsertDt
    18-AUG-08
    09-OCT-08
    22-OCT-09
    18-AUG-08
    19-NOV-08
    SQL> SY.

  • Question on using a Parameter against an Oracle date field

    Post Author: klkemp100
    CA Forum: Data Connectivity and SQL
    newbie here just getting started in Crystal Reports v11.0
    writing a report to go against an oracle view. i need the report to use a parameter that the user enters to select a specific date.
    i went through the database expert and keyed in my own sql since i first tested this via TOAD and know that the sql works fine with a hard-coded date etc.
    next i created a parameter and set it first up as a DATE but got the message that FAILED TO RETRIEVE DATA FROM THE DATABASE, even though I know that there is data to retrieve and i have previously retrieved it when the selection date is hard-coded in the query.
    i then changed the field type in the view to be a VARCHAR2 and changed the parameter to be a STRING, but am still getting the same thing.
    is there something special about using dates and parameters within crystal against oracle?
    thanks in advance for your help.

    Post Author: amr_foci
    CA Forum: Data Connectivity and SQL
    you also may check the date format , oracle maybe excpecting you to send the parameter in some format and you are sending it into another format
    if both are type dates in report and database you can use this
    where to_date(to_char(mytable.my_date_field,'dd/mm/yyyy'),'dd/mm/yyyy') = to_date(to_char(,'your_format'),'dd/mm/yyyy')
    you may use this in a free hand SQL
    good luck

  • I cannot display image (read from oracle BLOB field) on browser?

    I cannot display image (read from oracle BLOB field) on browser?
    Following is my code, someone can give me an advise?
    content.htm:
    <html>
    <h1>this is a test .</h1>
    <hr>
    <img  src="showcontent.jsp">
    </html>showcontent.jsp:
    <%@ page import="com.stsc.util.*" %>
    <%@ include file="/html/base.jsp" %>
    <% 
         STDataSet data = new STDataSet();
    //get blob field from database     
         String sql = "SELECT NR FROM ZWTAB WHERE BZH='liqf004' AND ZJH='001'";
         //get the result from database
         ResultSet rs = data.getResult(sql,dbBase);
         if (rs!=null && rs.next()) {
              Blob myBlob = rs.getBlob("NR");
              response.setContentType("image/jpeg");//
              byte[] ba = myBlob.getBytes(1, (int)myBlob.length());
              response.getOutputStream().write(ba);
              response.getOutputStream().flush();
         // close your result set, statement
         data.close();     
    %>

    Don't use jsp for that, use servlet. because the jsp engine will send a blank lines to outPutStream corresponding to <%@ ...> tags and other contents included in your /html/base.jsp file before sending the image. The result will not be treated as a valid image by the browser.
    To test this, type directly showcontent.jsp on your browser, and view it source.
    regards

  • Oracle.spatial.geocoder.metadata

    I am trying to Enable a Third party Geo-coder using the Sagent Centrus Real-Time Java API. The Oracle doc section 3.4 states that "Oracle offers a sample class, oracle.spatial.geocoder.Metadata to allow easy access..."
    But - I cannot find it in the database, or on the file system, or in Technet.
    Anyone have any additional information on the sample class provided? Or ideas on how to best "enable a third party geocoder".
    Has anyone by chance already written the interface for Sagent's Java client?
    Thanks.

    From Oracle documentation it mentions that "
    "The GC_PARSER_PROFILES and GC_PARSER_PROFILEAFS tables store address format definitions of all supported counties. These tables are used by the internal address parser in parsing postal addresses into addressing fields. The data for these two tables is provided by Oracle."
    However, I am not seeing "GC_PARSER_PROFILES" in my schema.
    Am I missing something?
    Thank you,
    J

  • Mimic oracle flex field ?

    Greeting Guru
    Our boss want to store different tables all into one table.
    and depends on the mapping from src and out_cols,  the data of the result table would have different interpretation.
    We would then create view on top for the specific app for that set of data
    There is the draft design that he borrows from oracle flex field
    Does this looks correct ? Not sure if there is a better way to do this ?
    See the script below for our first draft design.
    -Thanks
    drop table src
    create table src
    (id number,
    cde clob,
    desciption varchar2(4000),
    primary key(id)
    create table out_cols
    id number,
    src_id number,
    col_name varchar2(100),
    data_type varchar2(100),
    primary key (id),
    CONSTRAINT fk_src_id
        FOREIGN KEY (src_id)
        REFERENCES src (id)
    drop table result
    create table result
    (id number,
    ff001 number,
    ff002 number,
    ff003 number,
    ff001_num number,
    ff002_num number,
    ff003_num number,
    ff001_char varchar2(100),
    ff002_char varchar2(100),
    ff003_char varchar2(100),
    ff001_dat date,
    ff002_dat date,
    ff003_dat date,
    CONSTRAINT fk_ff001
        FOREIGN KEY (ff001)
        REFERENCES out_cols (id),
    CONSTRAINT fk_ff002
        FOREIGN KEY (ff002)
        REFERENCES out_cols (id),
    CONSTRAINT fk_ff003
        FOREIGN KEY (ff003)
        REFERENCES out_cols (id)

    my boss want to store different tables all into one table.
    and depends on the mapping from src and out_cols,  the data of the result table would have different interpretation.
    and we will create a view on top of the results for the specific app that needs that set of data.
    It should work but the design seems not to be the best use case ..?

  • View Fields Not Getting Displayed in View Set

    Hi All
    I have created a new View for Component IUICMDC and assigned it to a ViewSet and on click of a button i need to display this view . The navigation is happening fine but i am not able to see View Fields in it , only ZIUICMDC/AdvSearchVS is getting displayed on top of the page.
    View Area is defined and Debugger is stopping in the Do_init method of View which is assigned to ViewSet.
    Regards
    Alok Sharma

    You should provide the ability to create rows, you can do it on the table by making the table editable and putting a Add another row or you can choose to add it in a drill down create page.
    You can also add a set of new rows initially by creating and inserting rows in the vo in your PR.

  • Oracle error ORA-01461when trying to insert into an ORACLE BLOB field

    I am getting Oracle error ‘ORA-01461: can bind a LONG value only  for insert into a LONG column' when trying to insert into an ORACLE BLOB field. The error occurs when trying to insert a large BLOB (JPG), but does not occur when inserting a small (<1K) picture BLOB.(JPG). Any ideas?
    BTW, when using a SQL Server datasource using the same code.... everything works with no problems.
    ORACLE version is 11.2.0.1
    The ORACLE datasource is JDBC using Oracle's JDBC driver ojdbc6.jar v11.2.0.1 (I also have tried ojdbc5.jar v11.2.0.1; ojdbc5.jar v11.2.0.4; and ojdbc6.jar v11.2.0.4 with the same error result.)
    Here is my code:
    <cfset file_mime = Lcase(Right(postedXMLRoot.objname.XmlText, 3))>
    <cfif file_mime EQ 'jpg'><cfset file_mime = 'jpeg'></cfif>
    <cfset file_mime = 'data:image/' & file_mime & ';base64,'>
    <cfset image64 = ImageReadBase64("#file_mime##postedXMLRoot.objbase64.XmlText#")>
    <cfset ramfile = "ram://" & postedXMLRoot.objname.XmlText>
    <cfimage action="write" source="#image64#" destination="#ramfile#" overwrite="true">
    <cffile action="readbinary" file="#ramfile#" variable="image_bin">
    <cffile action="delete" file="#ramfile#">
    <cfquery name="InsertImage" datasource="#datasource#">
    INSERT INTO test_images
    image_blob
    SELECT
    <cfqueryparam value="#image_bin#" cfsqltype="CF_SQL_BLOB">
    FROM          dual
    </cfquery>

    Can't you use "alter index <shema.spatial_index_name> rebuild ONLINE" ? Thanks. I could switch to "rebuild ONLINE" and see if that helps. Are there any potential adverse effects going forward, e.g. significantly longer rebuild than not using the ONLINE keyword, etc? Also wondering if spatial index operations (index type = DOMAIN) obey all the typical things you'd expect with "regular" indexes, e.g. B-TREE, etc.

  • Users with read access to the site unable to view Managed Metadata Navigation

    Hi everyone,
    I created a Managed Metadata service and created group, term-set and terms
    I gave read access to users
    I set up navigation to use Managed Navigation
    I am logged in as farm admin and able to view the navigation when i browse site. But user are not seeing navigation.
    One thing i noticed is when i give users full access or designer access to site they will be able to see the navigation. but i don't want to give users full access or designer access to the site.
    How can users with read only access to site can view Managed Metadata Navigation...Please help?

    Hi Sunil,
    Have you given your users permissions to actually read the MMS data from the service application?
    http://technet.microsoft.com/en-us/library/ff625176.aspx covers permissions on the MMS.
    Regards
    Paul.
    <<edit>> On reflection you might be hitting the issue in this Stackexchange post..
    http://sharepoint.stackexchange.com/questions/75636/permissions-and-managed-metadata-in-navigation Is yours behaving the same way?
    Please ensure that you mark a question as Answered once you receive a satisfactory response. This helps people in future when searching and helps prevent the same questions being asked multiple times.

  • Oracle view in OBIEE

    Hi Experts ,
    We have Oracle View . There is no primary key is defined in this view. I need to join this view with some table in OBIEE physical layer.
    1. I have created one opaque view with query
    SELECT 'YES' PRESERVE FROM DUAL (Dummy table)
    and make the join ..and report is also working fine...
    So is this correct method.
    2. Can we define Key at OBIEE level.(Make an alias and do self join)
    If we define key at obiee level the key should be uniqe and for that we need to make all the view column as key.
    please suggest..which method is good.
    Thanks.
    S

    so can i create my key on any column and do the self join by creating alias...
    I just want to give a join to my view so that obiee will not give any warning...
    report is coming from view only...no fact and dimension here...view is on OLTP system

  • How do I view XMP metadata in Adobe Reader?

    How do I view XMP metadata in Adobe Reader?
    I've created a PDF which (I believe) includes XMP metadata, and I'd obviously like to check that it's been done correctly.  However it's not obvious how to view this within Adobe Reader (I'm using 11.0.04 on OS X).  Googling around, I've found an off-hand remark that Reader isn't able to do this, but this is obviously insane -- what's the point of licensing metadata if no-one can see it?  What is it I'm missing?
    Best wishes,
    Norman

    I've put a PDF at http://nxg.me.uk/temp/part1.pdf This does display/print perfectly OK in both Reader and in OS X Preview.  I presume that the /Root object (254) is inside one of the ObjStm streams (yes?), as (presumably) are the /Page streams and the reference to the /Metadata object, 52.
    Regarding scanning, Part 3 of the XMP spec, Sect 1.2 says "It is always best to use format-aware file parsing when possible. Lacking this information, applications can find XMP packets by scanning the file."  Also, in Sect. 1.2.1, "A file should be scanned byte-by-byte until a valid header is found."   Finally, ISO-32000-1 Sect. 14.3.2, Note 3, says "[The XMP spec] includes a method to embed XML data within non-XML data files in a platform-independent format that can be easily located and accessed by simple scanning rather than requiring the document file to be parsed."  So it would appear that this metadata packet _should_ be found.

  • Loading multiple text files from a folder into oracle clob field

    I would like to load about 300 word documents into a oracle clob field with each document inserted as a separate record.
    I'm not quite sure how to go about doing this. Is there a utility in oracle that would do this?
    I've looked at sql loader and utl_file but both require the name of the file. Is there a way I can do this?
    If its not possible using just oracle, does anyone know how I can do this in combination with perl?
    Many Thanks
    Sam

    I have no experience with this, but pl see if MOS Doc 73787.1 (How to Read A Binary File into BLOB Using PL/SQL) can help.
    Essentially, you will have to write code to loop thru all 300 files to load them into the database
    HTH
    Srini

  • Calculated Field formula not appearing in Power View Field List panel

    Hi,
    On Power View1 sheet of this
    workbook, the two PowerPivot calculated Field formulas (First Visit and First date of FY) are not appearing in the Power View Fields panel on the right hand side.
    I want to drag client and First Visit (calculated Field) to the Power View.
    Why is this happening?
    Regards, Ashish Mathur Microsoft Excel MVP www.ashishmathur.com

    I found a workaround for it - I was having the same problem as you. I wanted to display the last refresh date of my data, but Power View wouldn't display a date resulting from the [Last Refresh]=MAX(Date[Date]) formula.
    HOWEVER, a Pivot Table can handle that Calculated field just fine. So I renamed my measure "Refreshed Date" and added another tab in the Excel Sheet. I added a Pivot Table from PowerPivot into cell A1 and the only thing I put was that single
    measure (A2). To the right of that, I did =A2 and created an Excel Data Table. The title of that was "Last Refresh". Now, I could add that Data Table to the PowerPivot Model and into Power View. And then I hid that tab.
    The only downside to this method, is that if you're refreshing single tables at a time, you have to remember to refresh the Pivot Table when new data is added AND update the data in the model. I'm only connecting to one database, so I just choose
    "Refresh All" in Excel and it updates everything. It works perfectly! :)
    Well shoot, I even took a screenshot that helped explain everything, but it won't let me post it because my account isn't verified and it won't tell me how. If you have any questions, please let me know and I'll clarify!

  • Rebuilding of the InforSource of DBCONNECT to Oracle View

    Hello,
    following problem:
    I use DB connect to an Oracle Database to an View
    It works fine.
    I change the View in the Oracle Database and recompile it.
    I get an Error while loading with an InfoPackage.
    I have to drop the regenerate the Datasource and
    I must Drop ! the InfoSource and
    rebuild it completly again to be able to load again !
    This stemms due to the fact that BW seems to protocol the internal state of the Oracle View, like displayed in the Oracle Dictionnary views user_views, all_views
    or dba_views.
    This is an inacceptable BW system behaviour and impossible for day to day    
    business, development and much work, espescially if You develop a 12 or more
    DBConnect View interfaces !                                                                        
    Does anybody out there know how to make BW a more pleasent thing , customize it better to avoid this burden ?
    Thank You !
    Martin Sautter, Munich / Essen

    > Hi,
    >
    > when changing the view in Oracle it isn't necessary
    > to drop and recreate the ISource and DSource!!
    >
    > Proceed as follows:
    > - change your view (of course you can't rename it!)
    > - regenerate your datasource with tcode RSDBC
    > - open your TRules and maintain your TStructure
    > (change tab)
    > - maintain your TRules
    > - finally activate
    >
    > this is definitively enough.
    >
    > hope this helps...
    >
    > Olivier.
    >
    > Message was edited by:
    >         Olivier Cora
    > Hi,
    >
    > when changing the view in Oracle it isn't necessary
    > to drop and recreate the ISource and DSource!!
    >
    > Proceed as follows:
    > - change your view (of course you can't rename it!)
    > - regenerate your datasource with tcode RSDBC
    > - open your TRules and maintain your TStructure
    > (change tab)
    > - maintain your TRules
    > - finally activate
    >
    > this is definitively enough.
    >
    > hope this helps...
    >
    > Olivier.
    >
    > Message was edited by:
    >         Olivier Cora
    > Hi,
    >
    > when changing the view in Oracle it isn't necessary
    > to drop and recreate the ISource and DSource!!
    >
    > Proceed as follows:
    > - change your view (of course you can't rename it!)
    > - regenerate your datasource with tcode RSDBC
    > - open your TRules and maintain your TStructure
    > (change tab)
    > - maintain your TRules
    > - finally activate
    >
    > this is definitively enough.
    >
    > hope this helps...
    >
    > Olivier.
    >
    > Message was edited by:
    >         Olivier Cora
    > Hi,
    >
    > when changing the view in Oracle it isn't necessary
    > to drop and recreate the Source and DSource!!
    >
    > Proceed as follows:
    > - change your view (of course you can't rename it!)
    > - regenerate your datasource with tcode RSDBC
    > - open your TRules and maintain your TStructure
    > (change tab)
    > - maintain your TRules
    > - finally activate
    >
    > this is definitively enough.
    >
    > hope this helps...
    >
    > Olivier.
    >
    > Message was edited by:
    >         Olivier Cora
    > Hi,
    >
    > when changing the view in Oracle it isn't necessary
    > to drop and recreate the ISource and DSource!!
    >
    > Proceed as follows:
    > - change your view (of course you can't rename it!)
    > - regenerate your datasource with tcode RSDBC
    > - open your TRules and maintain your TStructure
    > (change tab)
    > - maintain your TRules
    > - finally activate
    >
    > this is definitively enough.
    >
    > hope this helps...
    >
    > Olivier.
    >
    > Message was edited by:
    >         Olivier Cora
    Hello,
    in all its ok, except You change the format ( number to char or char to number etc.) or the column name of  DBConnect's View or Table.
    In this case You have do delete the BW Datasource and rebuild it.
    It is advisable to name the DBConnect View or Table exactly as
    in BW. This makes setting up of the InfoSource very easy.
    Thank You
    Martin Sautter

Maybe you are looking for