Integer datatype

Hi,
In my Oracle 11 database, I have an INTEGER datatype. When I try to synchronize that to my database, datamodeler comes back saying the database column is a NUMBER(*,0) and, as such, indicates that the column does not match the model.
Specifically, I have a table COUNTRIES in model that has a column COUNTRY_ID defined as an INTEGER. In the database, it is also an INTEGER. When I synchronize the model, it shows that the columns do not match and the difference is the Data Type (NUMBER(*,0) != INTEGER) and Data Type Kind (Logical Type(NUMERIC) != Logical Type (Integer))
Is there a way to get SQL Datamodeler 4.0 to match the integer datatype to native?
Thanks!

Sorry, the exact version is SQL Datamodeler 4.0.0.833.
Interestingly, I use PL/SQL Developer. In there, a NUMBER(38,0) is automatically mapped/labelled an INTEGER.
This seems to be the interpretation from the DDL behaviour.
For example:
        SQL> create table test (x integer, y number);
        Table created.
        SQL> desc test
         Name                                      Null?    Type
         X                                                  NUMBER(38)
         Y                                                  NUMBER
The problem seems to be that if I define a column in Datamodeler as an INTEGER, it will always show as being different from the database when doing a merge.
Is there any way to define the mapping such that when I do a merge, this scenario is ignored?

Similar Messages

  • Sql syntax for converting a long datatype value in to a integer datatype value

    I have to make a sql query where in i have a value of long datatype and i want to convert it into integer datatype value
    null

    It would have helped if you could have posted sample data.
    now my requirement is to calculate the difference in hours between the start time and end time.Assuming you want the difference in time irrespective of the dates and the time is stored like HH24:MI:SS format, you could try something like:
    SQL> WITH test_tab AS
      2       (SELECT '09:12:33' start_time, '12:30:33' end_time
      3          FROM DUAL
      4        UNION ALL
      5        SELECT '09:12:33' start_time, '14:12:33' end_time
      6          FROM DUAL)
      7        -- end of test data
      8  SELECT end_time, start_time,
      9         TRUNC (  (  TO_DATE (end_time, 'HH24:MI:SS')
    10                   - TO_DATE (start_time, 'HH24:MI:SS')
    11                  )
    12                * 24
    13               ) diff_in_hours
    14    FROM test_tab
    15  /
    END_TIME START_TI DIFF_IN_HOURS
    12:30:33 09:12:33             3
    14:12:33 09:12:33             5
    2 rows selected.Hope this helps,
    Regards,
    Jo

  • How to convert a varchar to integer datatype in obiee Answers?

    Hi Gurus,
    I tried using cast to convert a varchar to integer type eg.
    cast (column as integer) in fx in answers but its not working.
    Can we use to_number function in answers?
    Also do we have any other way of changing the datatype of a column rather than changing it in
    Physical layer of the rpd.
    Thanks
    Ashish Gupta

    Always first choice should be BI instead of porting a function on DB side.
    As Lakshmipathi said do that.
    It would be always nice to share what you see instead of "Not working"
    have fun

  • Decimal's in Prompt dropdown for Integer datatype

    Hi All,
    I have a year column which is of integer data type. It is giving me decimal's in the drop down.
    So what I did was when to the data format and tried to override and save the default format for the column and also for the data type.
    It didn't work. It was still giving decimal's in the drop down.
    The only way I see is to cast it as varchar in the rpd and use it. But in future also should i do this for any Integer data type if I don't want to see decimals? Is there any other way that this can be handled?
    Thanks in Advance.
    Deep

    Hi,
    One way:
    Please go the corresponding column properties in Physical Layer in the repository and change the data type to INT. because most of the time, even though it is INT in db after importing it may take double automatically in physical layer
    Or,
    Edit the column in Formula in answers and CAST( COLUMN AS INT).
    First one will give you the permanent solution and the second one will have to user wherever you are having year in the report in prompt.
    Hope it helps!

  • INTEGER DATA TYPE+PAL

    Query 1)I am creating table in oracle 8.1.7 as
    Create table tablea
    (fielda INTEGER NULL
    Can anybody tell me what is max number of digits that can be stored in fielda.?
    I mean INTEGER stands for what in terms of NUMBER datatype.
    Query 2)I would be planning to migrate to oracle 9.2
    So do I have to make anychange in Scripts for creating new fields of integer datatype.
    Say after migrating to oracle 9.2
    I want to add the New field fieldb of same type as fielda
    So if I put as
    Alter table tablea
    Add fieldb INTEGER NULL
    is it ok ??
    or do i have to change something to NUMBER(p) to make it as same type as of fielda
    Someone suggested me NUMBER is of different type in Oracle 9.2 than in 8.1.7
    I am not 100% sure if anybody has faced such problem your suggestion is appreciated.
    Please help...
    Regards
    Mahesh

    This is how INTEGER is defined in Oracle:
    subtype INTEGER is NUMBER(38,0);
    So, it is nothing but a NUMBER datatype with the maximum precision.

  • INTEGER changed to NUMBER(22,0) when table is created in 9i release 2 !!!

    Dears,
    I have made DB schema for Oracle 9i release 2 on Solaris 5.9, and I was using INTEGER datatype when creating primary key, plz c the following sample script:
    create table SYSTEM_PARAMETERS (
    ID INTEGER not null,
    NAME VARCHAR2(50) not null,
    constraint PK_SYSTEM_PARAMETERS primary key (ID)
    It runs ok, but when I look at the generated schema I found that the ID field is NUMBER(22,0) ?!?!?!?!?
    I really don't know y?
    I couldn't beleive myself, so I re-run the script again and the problem persists so I generated the DDL using QDesigner from Quest software tool from the generated schema and here is the script
    CREATE TABLE system_parameters
    (id NUMBER(*,0) NOT NULL,
    name VARCHAR2(50) NOT NULL )
    ALTER TABLE system_parameters
    ADD CONSTRAINT pk_system_parameters PRIMARY KEY (id)
    I just deleted the storage options from the above script.
    Can anyone tell me y? and really I want it to be still INTEGER in DB, as I have third party tool that connects to this schema, and generates code depending on data type so it must stick with INTEGER not NUMBER(22,0).
    Thanks

    Two things are going on here.
    When a new file or folder is created, the group specified is inherited from its parent folder. So if some folder "foo" has the group "video" specified, then all new files created in that folder will also get group "video". It seems like you know this already.
    The problem you are having with TextEdit is that manner in which it saves new files. TextEdit creates a temporary directory first, saves the file there, and then moves the file to its proper destination folder as a final step. This is why it isn't getting the "video" group setting applied to it - it gets the "wheel" group from the temporary folder that it's really being created in. Some other Apple apps behave this way too - Safari when saving a web page to disk, for example.
    I have filed a bug report to Apple about this a long time ago. The report I filed was listed as a "duplicate". I don't know when, if ever, this will be fixed.

  • What is the equivalant to t-sql  integer in oracle?

    I have heard that oracle doesn't have a "integer" value for table structures.
    It took all my integer fields and made them Number(10,0).
    When my program runs it compares the result to an integer and fails.. If I look at the value it says "1d" which I assume to mean 1 decimal datatype.
    I need to return an integer datatype. Do i need to change all the Number(10,0) to Number(10) or something else?

    number (10,0) is an integer type. How are you comparing numbers? I suspect a client conversion problem.
    By the way, this forum is specifically for the SQL Developer tool. You might get more responses in the 'SQL and PL/SQL' forum.

  • Changes in the Datatype

    Hi,
    Scenario : Webservice -> XI -> JDBC  or any scenaio
    I have to pass a mandatory integer datatype input as per the <b>latest</b> changes, but my old Sender client(To send the request value to XI) has the old code so it can pass only String or other than integer datatypes.. What all errors we have to face for this case?
    Note: The old sender client is not updated with the latest changes. In future also we don't want to update it.
    Regards
    Sara

    Hi
    I dont think you will face any errors without the update
    regards
    krishna

  • Datatypes in InterfaceObjects

    Hi,
      Today while creating a scenario just gone through types of datatypes avaliable in while creating datastructure. And suprised to see it was around 44 as mentioned below.
    <b>xsd:string>>use:to specify string >> value:" Hi"</b>
    <b>xsd:integer>>use: to specify integer>>value:123</b>
    <b>xsd:boolean>>use: to specify boolen value>>value:true/false or 0or1</b>
    <b>xsd:short>>use:to specify short value>>value:123
    xsd:byte>>use:to specify byte value>>value:123
    xsd:float>>use:to specify integer with decimal>>value:123.05
    xsd:base64Binary>>use:to specify base64Binary>>value:456789AB
    xsd:hexBinary>>use:to specity the binaaryvalue>>value:010101</b>
    xsd:decimal
    <b>xsd:double>>use:tospecify double value>>value:-3.140...0E+02
    xsd:time>>use:to specify the time>>value:20:15:01
    xsd:dateTime>>use:to specify the timewithdate>>value:2002-02-0420:15:01</b>xsd:duration
    <b>xsd:date>>use:to specify the date>>value:2002-02-04</b>
    xsd:gMonth
    xsd:gYear
    xsd:gYearMonth
    xsd:gDay
    xsd:gMonthDay
    xsd:QName
    xsd:anyURI
    xsd:NOTATION
    xsd:normalizedString
    xsd:token
    xsd:unsignedByte
    xsd:positiveInteger
    xsd:negativeInteger
    xsd:nonNegativeInteger
    xsd:nonPositiveInteger
    xsd:int
    xsd:unsignedInt
    xsd:long
    xsd:unsignedLong
    xsd:unsignedShort
    xsd:Name
    xsd:NCName
    xsd:language
    xsd:ID
    xsd:IDREF
    xsd:IDREFS
    xsd:ENTITY
    xsd:ENTITIES
    xsd:NMTOKEN
    If don't mine like to know the details when we will be using and few which I marked in bold was know by me as it was come in common scenario.  Like to know the same way which would be help for me in future reference.
    the below is not given much detail i suppose
    http://help.sap.com/saphelp_nw04/helpdata/en/a5/04623c4f69b712e10000000a114084/content.htm
    http://help.sap.com/search/highlightContent.jsp
    Regards,
    Senthil.

    Hi,
    <b>anyURI</b>
    The data must conform to the syntax of a Uniform Resource Identifier (URI), as defined in RFC 2396 as amended by RFC 2732. Example: "http://www.nmt.edu/tcc/" is the URI for the New Mexico Tech Computer Center's index page.
    <b>base64Binary</b>
    Represents a sequence of binary octets (bytes) encoded according to RFC 2045, the standard defining the MIME types (look under “6.8 Base64 Content-Transfer-Encoding”).
    <b>boolean</b>
    A Boolean true or false value. Representations of true are "true" and "1"; false is denoted as "false" or "0".
    <b>byte</b>
    A signed 8-bit integer in the range [-256, 255]. Derived from the short datatype.
    <b>date</b>
    Represents a specific date. The syntax is the same as that for the date part of dateTime, with an optional time zone indicator. Example: "1889-09-24".
    <b>dateTime</b>
    Represents a specific instant of time. It has the form YYYY-MM-DDThh:mm:ss folowed by an optional time-zone suffix.
    YYYY is the year, MM is the month number, DD is the day number, hh the hour in 24-hour format, mm the minute, and ss the second (a decimal and fraction are allowed for the seconds part).
    The optional zone suffix is either "Z" for Universal Coordinate Time (UCT), or a time offset of the form "hh:mm", giving the difference between UCT and local time in hours and minutes.
    Example: "2004-10-31T21:40:35.5-07:00" is a time on Halloween 2004 in Mountain Standard time. The equivalent UCT would be "2004-11-01T02:40:35.5Z".
    <b>decimal</b>
    Any base-10 fixed-point number. There must be at least one digit to the left of the decimal point, and a leading "" or "-" sign is allowed. Examples: "42", "-3.14159", "0.004".
    <b>double</b>
    A 64-bit floating-point decimal number as specified in the IEEE 754-1985 standard. The external form is the same as the float datatype.
    <b>duration</b>
    Represents a duration of time, as a composite of years, months, days, hours, minutes, and seconds. The syntax of a duration value has these parts:
    If the duration is negative, it starts with "-".
    A capital "P" is always included.
    If the duration has a years part, the number of years is next, followed by a capital "Y".
    If there is a months part, it is next, followed by capital "M".
    If there is a days part, it is next, followed by capital "D".
    If there are any hours, minutes, or seconds in the duration, a capital "T" comes next; otherwise the duration ends here.
    If there is an hours part, it is next, followed by capital "H".
    If there is a minutes part, it is next, followed by capital "M".
    If there is a seconds part, it is next, followed by capital "S". You can use a decimal point and fraction to specify part of a second.
    Missing parts are assumed to be zero. Examples: "P1347Y" is a duration of 1347 Gregorian years; "P1Y2MT2H5.6S" is a duration of one year, two months, two hours, and 5.6 seconds.
    <b>
    float</b>
    A 32-bit floating-point decimal number as specified in the IEEE 754-1985 standard. Allowable values are the same as in the decimal type, optionally followed by an exponent, or one of the special values "INF" (positive infinity), "-INF" (negative infinity), or "NaN" (not a number).
    The exponent starts with either "e" or "E", optionally followed by a sign, and one or more digits.
    Example: "6.0235e-23".
    <b>gDay</b>
    A day of the month in the Gregorian calendar. The syntax is "-DD" where DD is the day of the month. Example: the 27th of each month would be represented as "-27".
    <b>gMonth</b>
    A month number in the Gregorian calendar. The syntax is "MM", where MM is the month number. For example, "06" represents the month of June.
    <b>gMonthDay</b>
    A Gregorian month and day as "MM-DD". Example: "07-04" is the Fourth of July.
    <b>gYear</b>
    A Gregorian year, specified as YYYY. Example: "1889".
    <b>gYearMonth</b>
    A Gregorian year and month. The syntax is YYYY-MM. Example: "1995-08" represents August 1995.
    <b>hexBinary</b>
    Represents a sequence of octets (bytes), each given as two hexadecimal digits. Example: "0047dedbef" is five octets.
    <b>ID</b>
    A unique identifier as in the ID attribute type from the XML standard.
    Derived from the NCName datatype.
    <b>IDREF, IDREFS</b>
    An IDREF value is a reference to a unique identifier as defined under attribute types in the XML standard. An IDREFS value is a space-separated sequence of such references.
    Derived from the NCName datatype.
    <b>int</b>
    Represents a 32-bit signed integer in the range [-2,147,483,648, 2,147,483,647]. Derived from the long datatype.
    <b>integer</b>
    Represents a signed integer. Values may begin with an optional "+" or "-" sign. Derived from the decimal datatype.
    <b>language</b>
    One of the standardized language codes defined in RFC 1766. Example: "fj" for Fijian. Derived from the token type.
    <b>long</b>
    A signed, extended-precision integer; at least 18 digits are guaranteed. Derived from the integer datatype.
    <b>Name</b>
    A name as defined in the XML standard:. The first character can be a letter or underbar “_”, and the remaining characters may be letters, underbars, hyphen “-”, period “.”, or colon “:”.
    Derived from the token datatype.
    <b>NCName</b>
    The local part of a qualified name. See the NCName definition in the document Namespaces in XML.
    Derived from the name datatype.
    <b>negativeInteger</b>
    Represents an integer less than zero. Derived from the nonPositiveInteger datatype.
    <b>NMTOKEN, NMTOKENS</b>
    Any sequence of name characters, defined in the XML standard: letters, underbars “_”, hyphen “-”, period “.”, or colon “:”.
    A NMTOKENS data value is a space-separated sequence of NMTOKEN values.
    Derived from the NMTOKEN datatype.
    <b>nonNegativeInteger</b>
    An integer greater than or equal to zero. Derived from the integer datatype.
    <b>nonPositiveInteger</b>
    An integer less than or equal to zero. Derived from the integer datatype.
    <b>normalizedString</b>
    This datatype describes a “normalized” string, meaning that it cannot include newline (LF), return (CR), or tab (HT) characters.
    Derived from the string type.
    <b>positiveInteger</b>
    An extended-precision integer greater than zero. Derived from the nonNegativeInteger datatype.
    <b>QName</b>
    An XML qualified name, such as "xsl:stylesheet".
    <b>short</b>
    A 16-bit signed integer in the range [-32,768, 32,767]. Derived from the int datatype.
    <b>string</b>
    Any sequence of zero or more characters.
    <b>time</b>
    A moment of time that repeats every day. The syntax is the same as that for dateTime, omitting everything up to and including the separator "T". Examples: "00:00:00" is midnight, and "13:04:00" is an hour and four minutes after noon.
    <b>token</b>
    The values of this type represent tokenized strings. They may not contain newline (LF) or tab (HT) characters. They may not start or end with whitespace. The only occurrences of whitespace allowed inside the string are single spaces, never multiple spaces together. Derived from normalizedString.
    <b>unsignedByte</b>
    An unsigned 16-bit integer in the range [0, 255]. Derived from the unsignedShort datatype.
    <b>unsignedInt</b>
    An unsigned 32-bit integer in the range [0, 4,294,967,295]. Derived from the unsignedLong datatype.
    <b>unsignedLong</b>
    An unsigned, extended-precision integer. Derived from the nonNegativeInteger datatype.
    <b>unsignedShort</b>
    An unsigned 16-bit integer in the range [0, 65,535]. Derived from the unsignedInt datatype.
    <b></b>
    anything missing ?
    regards,
    Robin

  • Reg : Number v/s Integer -

    Hi Experts,
    I have a confusion regarding the usage of data types - Number & Integer.
    I'm into Pl/Sql development and generally use Number.
    Below text is from the docs -
    >
    Analytic workspace calculations on NUMBER variables is slower than other numerical data types because NUMBER values are calculated in software (for accuracy) rather than in hardware (for speed).
    When data is fetched from an analytic workspace to a relational column that has the NUMBER data type, performance is best when the data already has the NUMBER data type in the analytic workspace because a conversion step is not required.
    >
    Can any body please explain me this difference and what exactly is this Analytic workspace mentioned here?
    Taken from -- http://docs.oracle.com/cd/B19306_01/olap.102/b14346/dml_datatypes002.htm
    Thanks,
    Ranit B.

    >
    But then y not lets always use INTEGER? It'll always be fast... right?
    >
    Pull back on the reins, there, cowboy, and let that horse catch his breath.
    Don't confuse SQL datatypes with PL/SQL datatypes. NUMBER is an Oracle SQL datatype. See the doc reference I gave you above. INTEGER is an ANSI SQL datatype and Oracle supports it but used NUMBER(38) instead.
    Both wind up being NUMBER which is processed using 'software' and not hardware.
    If you want to talk about PL/SQL datatypes see the PL/SQL Language doc
    http://docs.oracle.com/cd/E11882_01/appdev.112/e10472/tuning.htm#BABEJFDG
    In particular see 3 PL/SQL Data Types. There you will find PLS_INTEGER and BINARY_INTEGER which DO use hardware and so are faster than the software versions.
    Also see 'Tune Computation-Intensive PL/SQL Code' which has a section 'Use Data Types that Use Hardware Arithmetic'. That sections discusses how hardware is used. But those datatypes are PL/SQL and do not include NUMBER or INTEGER which are SQL types.
    However, to make things more confusing the OLAP module uses PL/SQL code and does define additional PL/SQL datatypes. And one of them is INTEGER (not to be confused with the SQL datatype INTEGER). And that PL/SQL datatype IS a subset of PLS_INTEGER (just like BINARY_INTEGER is) and so DOES use hardware for implementation.
    See Numeric Data Types in the OLAP DML Reference
    http://docs.oracle.com/cd/B19306_01/olap.102/b14346/dml_datatypes002.htm#g1022512
    Are you confused yet? In summary, yes OLAP DML does define an INTEGER datatype that, internally, gets processed treated like the PLS_INTEGER PL/SQL datatype and can use hardware implementation. But that is NOT the same INTEGER datatype that the SQL engine supports.
    So when talking about INTEGER it is important to include which engine you are talking about; the SQL engine or the OLAP engine. If you are talking about SQL then use NUMBER rather than INTEGER since INTEGER just uses NUMBER(38) anyway.
    If you are talking about OLAP the use INTEGER instead of number so that Oracle can use hardware instead of software to perform the calculations. The OLAP DML doc cited above provides the guidance you need in the section 'Using NUMBER Values'
    >
    Using NUMBER Values
    When you define a NUMBER variable, you can specify its precision (p) and scale (s) so that it is sufficiently, but not unnecessarily, large. Precision is the number of significant digits. Scale can be positive or negative. Positive scale identifies the number of digits to the right of the decimal point; negative scale identifies the number of digits to the left of the decimal point that can be rounded up or down.
    The NUMBER data type is supported by Oracle Database standard libraries and operates the same way as it does in SQL. It is used for dimensions and surrogates when a text or INTEGER data type is not appropriate. It is typically assigned to variables that are not used for calculations (like forecasts and aggregations), and it is used for variables that must match the rounding behavior of the database or require a high degree of precision. When deciding whether to assign the NUMBER data type to a variable, keep the following facts in mind in order to maximize performance:
    •Analytic workspace calculations on NUMBER variables is slower than other numerical data types because NUMBER values are calculated in software (for accuracy) rather than in hardware (for speed).
    •When data is fetched from an analytic workspace to a relational column that has the NUMBER data type, performance is best when the data already has the NUMBER data type in the analytic workspace because a conversion step is not required.
    >
    Workspace calculations are faster using INTEGER but the fetching of data to/from relational tables is faster if the workspace datatype is NUMBER.
    So as with many things Oracle there is a tradeoff. If the bulk of your process is moving data between the workspace and relational tables use NUMBER. If the bulk of your process involves mostly calculations use INTEGER.
    My suggestion would be start simple. Use NUMBER everywhere until you have a workspace performance issue and then you can do the testing and consider converting the workspace datatypes to INTEGER.

  • DATATYPE differences

    I created tables based on the script which i have on oracle 8.1.6 into the 11g databse ...
    But when i created these tables in 11g , i got too much of differences in datatypes ..
    In 8i db I have INTEGER datatype and when i created in 11g it changed to NUMBER datatype ..
    I think it cant create any problem rite ..after changing to NUMBER .. I think now Integer is OBSOLETE is it rite...

    Your datatypes definitions
    8.1.7: http://download.oracle.com/docs/cd/A87860_01/doc/index.htm
    9.2.0: http://download.oracle.com/docs/cd/B10501_01/server.920/a96540/toc.htm
    10.2.0: http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/toc.htm
    11.1.0: http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/toc.htm
    See 'Chapter 2' the section on Data types.

  • 11g and Exp - A bugging bug.

    Before export (exp) i used to to run this script to recompile all the user objects on 10g.
    create or replace
    PROCEDURE DBA_Recompile
         p_PInstance_ID               IN NUMBER --     DEFAULT NULL
    * Title:      Recompile all User_Objects
    * Description:
    *     * Recompile materialized views too
    AS
         --     Logistice
         v_Message                              VARCHAR2(2000) := ' ';
         v_Result                              NUMBER := 1;     --      0=failure
         v_Buffer                              VARCHAR2(2000);
         v_Line                              VARCHAR(100);
         v_PrintInfo                         CHAR(1) := 'N';     --     Diagnostic
         CURSOR     Cur_Invalids IS
              SELECT     object_id, object_name, object_type
              FROM     user_objects
              WHERE     status <> 'VALID'
                AND     object_type IN ('VIEW', 'PACKAGE', 'PACKAGE BODY', 'FUNCTION',
                                            'MATERIALIZED VIEW', -- arhipac: teo_sarca
                                            'PROCEDURE', 'TRIGGER', 'JAVA CLASS')
              ORDER BY object_type, object_name;
         CURSOR     Cur_Valids (p_id NUMBER) IS
              SELECT     'FOUND'
              FROM     user_objects
              WHERE     status = 'VALID'
                AND     object_id = p_id;
         --  failed compile
         TYPE invalid_tab IS TABLE OF Cur_Invalids%ROWTYPE INDEX BY BINARY_INTEGER;
         invalid_tab_rec invalid_tab;
         count_compiled     PLS_INTEGER;
         valid_text     VARCHAR2(5);
         exec_cursor     PLS_INTEGER := DBMS_SQL.OPEN_CURSOR;
         sql_statement     VARCHAR2(200);
         count_object     PLS_INTEGER := 0;
         v_err          BINARY_INTEGER;
    BEGIN
         LOOP
              count_compiled := 0;
              FOR ci IN Cur_Invalids LOOP
                   --  not unsuccessfuly compiled yet
                   IF NOT invalid_tab_rec.EXISTS(ci.object_id) THEN
                        IF (ci.object_type = 'JAVA CLASS') THEN
                             sql_statement := 'ALTER JAVA CLASS "' || ci.object_name || '" RESOLVE';
                        ELSIF (ci.object_type = 'PACKAGE BODY') THEN
                             sql_statement := 'ALTER PACKAGE ' || ci.object_name || ' COMPILE BODY';
                        ELSE
                             sql_statement := 'ALTER ' || ci.object_type || ' ' || ci.object_name || ' COMPILE';
                        END IF;
                        --  compile
                        BEGIN
                             count_object := count_object + 1;
                             DBMS_SQL.PARSE(exec_cursor, sql_statement, DBMS_SQL.NATIVE);
                        EXCEPTION
                             WHEN OTHERS THEN
                                  NULL;
                        END;
                        OPEN Cur_Valids (ci.object_ID);
                        FETCH Cur_Valids INTO valid_text;
                        IF Cur_Valids%ROWCOUNT > 0 THEN
                             IF (v_PrintInfo = 'Y') THEN
                                  DBMS_OUTPUT.PUT_LINE('OK: ' || ci.object_type || ' ' || ci.object_name);
                             END IF;
                             count_compiled := count_compiled + 1;
                             CLOSE Cur_Valids;
                             EXIT;
                        ELSE
                             IF (LENGTH(v_Message) < 1950) THEN
                                  v_Message := v_Message || ci.object_name || ' ';
                             END IF;
                             IF (v_PrintInfo = 'Y') THEN
                                  DBMS_OUTPUT.PUT_LINE('Error: ' || ci.object_type || ' ' || ci.object_name);
                             END IF;
                             invalid_tab_rec(ci.object_id).object_name := ci.object_name;
                             invalid_tab_rec(ci.object_id).object_type := ci.object_type;
                             CLOSE Cur_Valids;
                        END IF;
                   END IF; -- not unsuccessfuly compiled yet
              END LOOP;     -- Cur_Invalids
              --  any other to be compiled
              IF count_compiled = 0 THEN
                   EXIT;
              END IF;
         END LOOP;     -- outer loop
         DBMS_SQL.CLOSE_CURSOR(exec_cursor);
         --     Print Message
         IF (LENGTH(v_Message) = 1) THEN
              v_Message := 'All valid';
              DBMS_OUTPUT.PUT_LINE(v_Message);
         ELSIF (LENGTH(v_Message) > 80) THEN
              v_Buffer := v_Message;
              DBMS_OUTPUT.PUT_LINE('>');
              WHILE (LENGTH(v_Buffer) > 0) LOOP
                   v_Line := SUBSTR(v_Buffer, 1, 80);
                   DBMS_OUTPUT.PUT_LINE(v_Line);
                   v_Buffer := SUBSTR(v_Buffer, 81);
              END LOOP;
              DBMS_OUTPUT.PUT_LINE('<');
              v_Result := 0;
              DBMS_OUTPUT.PUT_LINE('ERROR');
         ELSE
              DBMS_OUTPUT.PUT_LINE('>' || v_Message || '<');
              v_Result := 0;
              DBMS_OUTPUT.PUT_LINE('ERROR');
         END IF;
    <<FINISH_PROCESS>>
         IF (p_PInstance_ID IS NOT NULL) THEN
              --  Update AD_PInstance
              UPDATE     AD_PInstance
              SET Updated = SysDate,
                   IsProcessing = 'N',
                   Result = v_Result,               -- 1=success
                   ErrorMsg = v_Message
              WHERE     AD_PInstance_ID=p_PInstance_ID;
         END IF;
         COMMIT;
         RETURN;
    EXCEPTION
         WHEN OTHERS THEN
              DBMS_OUTPUT.PUT_LINE(SQLERRM);
              IF DBMS_SQL.IS_OPEN(exec_cursor) THEN
                   DBMS_SQL.CLOSE_CURSOR(exec_cursor);
              END IF;
              IF Cur_Valids%ISOPEN THEN
                   CLOSE Cur_Valids;
              END IF;
    END DBA_Recompile;• Q1: On my 11gR2, after running this script, the database becomes unstable for backup. And i cannot take backup anymore using 'exp' command. following error occurs (last few lines).
    . exporting synonyms
    . exporting views
    EXP-00056: ORACLE error 1455 encountered
    ORA-01455: converting column overflows integer datatype
    EXP-00000: Export terminated unsuccessfully
    adding: ExpDat.dmp(in = 488030208) (out= 26855576)(deflated 94%)
    adding: ExpDat.log(in = 111665) (out= 6645)(deflated 94%)the message looks like some old days bug: EXP-00056: ORACLE error 1455 encountered
    • Q2: can i skip this script to run, before the backup using 'exp'
    w\

    Are you using the 10g client to perform the export with?
    If so, then this is a recognised bug:
    View the following metalink document for more info
    Exporting Schema In 11.2 Database With 10g Client Gives Ora-01455 [ID 1083330.1]

  • How to convert Report Model to Report Designer DataSet

    To all,
    I have a two part question. One is I am experiencing the error at the end of this question when migrating SQL Server 2005 SSRS Native Reports, the report uses a Report Model, to SQL Server 2008 SSRS Native. I bring the Report and Report Model to SQL Server 2008 SSRS and get the error at the end of the question below. Background and the 2nd question are below.
    I have a bunch of Report Builder based Reports. I need to convert them to VS BIDS based Report Designer Reports with Shared Datasources and MDX based DataSets.
    How can I grab the MDX from the Report Builder Report Model so I can put it into the Report Designer DataSet Query Definition?
    What is the easiest way to make this migration between these Report development environments.
    I am able to open the Report.RDL file in VS BIDS and can see the entire UI layer. The DataSet I see here is the one that is related to the error at the end of the question. The RD/DataSet holds:
    <SemanticQuery xmlns="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rb="http://schemas.microsoft.com/sqlserver/2004/11/reportbuilder" xmlns:qd="http://schemas.microsoft.com/sqlserver/2004/11/semanticquerydesign">
      <Hierarchies>
        <Hierarchy>
          <BaseEntity>
            <!--Fact Messages-->
            <EntityID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Entity_MeasureGroup_DW_Text_Fact_Messages</EntityID>
          </BaseEntity>
          <Groupings>
            <Grouping Name="Date">
              <Expression Name="Date">
                <Path>
                  <RolePathItem>
                    <!--Dim Date-->
                    <RoleID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Role_MeasureGroupDimension_Entity_MeasureGroup_DW_Text_Fact_Messages_Entity_Dimension_Dim_Date_Entity_Dimension_DW_Text_Dim_Date</RoleID>
                  </RolePathItem>
                </Path>
                <AttributeRef>
                  <!--Full Date-->
                  <AttributeID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Attribute_Hierarchy_Dim_Date.Full_Date</AttributeID>
                </AttributeRef>
              </Expression>
            </Grouping>
            <Grouping Name="Hour">
              <Expression Name="Hour">
                <Path>
                  <RolePathItem>
                    <!--Dim Time-->
                    <RoleID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Role_MeasureGroupDimension_Entity_MeasureGroup_DW_Text_Fact_Messages_Entity_Dimension_Dim_Time_Entity_Dimension_DW_Text_Dim_Time</RoleID>
                  </RolePathItem>
                </Path>
                <AttributeRef>
                  <!--Hour24-->
                  <AttributeID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Attribute_Hierarchy_Dim_Time.Hour24</AttributeID>
                </AttributeRef>
              </Expression>
            </Grouping>
            <Grouping Name="Year">
              <Expression Name="Year">
                <Path>
                  <RolePathItem>
                    <!--Dim Date-->
                    <RoleID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Role_MeasureGroupDimension_Entity_MeasureGroup_DW_Text_Fact_Messages_Entity_Dimension_Dim_Date_Entity_Dimension_DW_Text_Dim_Date</RoleID>
                  </RolePathItem>
                </Path>
                <AttributeRef>
                  <!--Year-->
                  <AttributeID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Attribute_Hierarchy_Dim_Date.Year</AttributeID>
                </AttributeRef>
              </Expression>
            </Grouping>
          </Groupings>
          <Filter>
            <Expression Name="expr1">
              <Function>
                <FunctionName>And</FunctionName>
                <Arguments>
                  <Expression>
                    <Function>
                      <FunctionName>And</FunctionName>
                      <Arguments>
                        <Expression>
                          <Function>
                            <FunctionName>GreaterThanOrEquals</FunctionName>
                            <Arguments>
                              <Expression>
                                <Path>
                                  <RolePathItem>
                                    <!--Dim Date-->
                                    <RoleID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Role_MeasureGroupDimension_Entity_MeasureGroup_DW_Text_Fact_Messages_Entity_Dimension_Dim_Date_Entity_Dimension_DW_Text_Dim_Date</RoleID>
                                  </RolePathItem>
                                </Path>
                                <AttributeRef>
                                  <!--Date-->
                                  <AttributeID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Attribute_Hierarchy_Dim_Date.Date</AttributeID>
                                </AttributeRef>
                              </Expression>
                              <Expression>
                                <Function>
                                  <FunctionName>DateAdd</FunctionName>
                                  <Arguments>
                                    <Expression>
                                      <Literal>
                                        <DataType>String</DataType>
                                        <Value>Day</Value>
                                      </Literal>
                                    </Expression>
                                    <Expression>
                                      <Function>
                                        <FunctionName>Negate</FunctionName>
                                        <Arguments>
                                          <Expression>
                                            <ParameterRef>
                                              <ParameterName>Date  in last  (n)  days</ParameterName>
                                            </ParameterRef>
                                          </Expression>
                                        </Arguments>
                                      </Function>
                                    </Expression>
                                    <Expression>
                                      <Function>
                                        <FunctionName>Today</FunctionName>
                                      </Function>
                                    </Expression>
                                  </Arguments>
                                </Function>
                              </Expression>
                            </Arguments>
                          </Function>
                        </Expression>
                        <Expression>
                          <Function>
                            <FunctionName>LessThan</FunctionName>
                            <Arguments>
                              <Expression>
                                <Path>
                                  <RolePathItem>
                                    <!--Dim Date-->
                                    <RoleID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Role_MeasureGroupDimension_Entity_MeasureGroup_DW_Text_Fact_Messages_Entity_Dimension_Dim_Date_Entity_Dimension_DW_Text_Dim_Date</RoleID>
                                  </RolePathItem>
                                </Path>
                                <AttributeRef>
                                  <!--Date-->
                                  <AttributeID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Attribute_Hierarchy_Dim_Date.Date</AttributeID>
                                </AttributeRef>
                              </Expression>
                              <Expression>
                                <Function>
                                  <FunctionName>Today</FunctionName>
                                </Function>
                              </Expression>
                            </Arguments>
                          </Function>
                        </Expression>
                      </Arguments>
                    </Function>
                    <CustomProperties>
                      <CustomProperty Name="qd:FilterCondition" />
                    </CustomProperties>
                  </Expression>
                  <Expression>
                    <Function>
                      <FunctionName>Equals</FunctionName>
                      <Arguments>
                        <Expression>
                          <Path>
                            <RolePathItem>
                              <!--Dim Volume-->
                              <RoleID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Role_MeasureGroupDimension_Entity_MeasureGroup_DW_Text_Fact_Messages_Entity_Dimension_Dim_Volume_Entity_Dimension_DW_Text_Dim_Volume</RoleID>
                            </RolePathItem>
                          </Path>
                          <AttributeRef>
                            <!--Description-->
                            <AttributeID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Attribute_Hierarchy_Dim_Volume.Description</AttributeID>
                          </AttributeRef>
                        </Expression>
                        <Expression>
                          <Literal>
                            <DataType>String</DataType>
                            <Value>Volume</Value>
                          </Literal>
                        </Expression>
                      </Arguments>
                    </Function>
                    <CustomProperties>
                      <CustomProperty Name="qd:FilterCondition" />
                    </CustomProperties>
                  </Expression>
                </Arguments>
              </Function>
              <CustomProperties>
                <CustomProperty Name="qd:Filter" />
                <CustomProperty Name="qd:ContextEntityID">
                  <Value xsi:type="xsd:string">http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling:Entity_MeasureGroup_DW_Text_Fact_Messages</Value>
                </CustomProperty>
                <CustomProperty Name="qd:AutoChangeBaseEntity" />
                <CustomProperty Name="qd:Design">
                  <Value xsi:type="xsd:string">expr2</Value>
                </CustomProperty>
              </CustomProperties>
            </Expression>
          </Filter>
        </Hierarchy>
      </Hierarchies>
      <MeasureGroups>
        <MeasureGroup>
          <BaseEntity>
            <!--Fact Messages-->
            <EntityID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Entity_MeasureGroup_DW_Text_Fact_Messages</EntityID>
          </BaseEntity>
          <Measures>
            <Expression Name="Volume">
              <AttributeRef>
                <!--Volume-->
                <AttributeID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Attribute_Measure_DW_Text_Volume</AttributeID>
              </AttributeRef>
            </Expression>
            <Expression Name="Auto %">
              <AttributeRef>
                <!--Automated_Pct-->
                <AttributeID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Attribute_Measure_DW_Text_Automated_Pct</AttributeID>
              </AttributeRef>
            </Expression>
            <Expression Name="Send Now %">
              <AttributeRef>
                <!--Send_Now_Pct-->
                <AttributeID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Attribute_Measure_DW_Text_Send_Now_Pct</AttributeID>
              </AttributeRef>
            </Expression>
            <Expression Name="Use %">
              <AttributeRef>
                <!--Use_Pct-->
                <AttributeID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Attribute_Measure_DW_Text_Use_Pct</AttributeID>
              </AttributeRef>
            </Expression>
            <Expression Name="Stock Ans %">
              <AttributeRef>
                <!--StockAns_Pct-->
                <AttributeID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Attribute_Measure_DW_Text_StockAns_Pct</AttributeID>
              </AttributeRef>
            </Expression>
            <Expression Name="Charged">
              <AttributeRef>
                <!--Charged_Pct-->
                <AttributeID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Attribute_Measure_DW_Text_Charged_Pct</AttributeID>
              </AttributeRef>
            </Expression>
            <Expression Name="Billed">
              <AttributeRef>
                <!--Billed_Pct-->
                <AttributeID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Attribute_Measure_DW_Text_Billed_Pct</AttributeID>
              </AttributeRef>
            </Expression>
            <Expression Name="Avg TTA (s)">
              <AttributeRef>
                <!--Avg_TT_Answer-->
                <AttributeID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Attribute_Measure_DW_Text_Avg_TT_Answer</AttributeID>
              </AttributeRef>
            </Expression>
            <Expression Name="Avg TTC (s)">
              <AttributeRef>
                <!--Avg_Time_To_Customer-->
                <AttributeID xmlns:np="http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling">np:Attribute_Measure_DW_Text_Avg_Time_To_Customer</AttributeID>
              </AttributeRef>
            </Expression>
          </Measures>
          <SubtotalSets>
            <SubtotalSet>
              <SubtotalGroupings>
                <GroupingName>Year</GroupingName>
              </SubtotalGroupings>
              <SubtotalMeasures>
                <MeasureName>Volume</MeasureName>
                <MeasureName>Auto %</MeasureName>
                <MeasureName>Send Now %</MeasureName>
                <MeasureName>Use %</MeasureName>
                <MeasureName>Stock Ans %</MeasureName>
                <MeasureName>Charged</MeasureName>
                <MeasureName>Billed</MeasureName>
                <MeasureName>Avg TTA (s)</MeasureName>
                <MeasureName>Avg TTC (s)</MeasureName>
              </SubtotalMeasures>
            </SubtotalSet>
            <SubtotalSet>
              <SubtotalGroupings>
                <GroupingName>Date</GroupingName>
                <GroupingName>Year</GroupingName>
              </SubtotalGroupings>
              <SubtotalMeasures>
                <MeasureName>Volume</MeasureName>
                <MeasureName>Auto %</MeasureName>
                <MeasureName>Send Now %</MeasureName>
                <MeasureName>Use %</MeasureName>
                <MeasureName>Stock Ans %</MeasureName>
                <MeasureName>Charged</MeasureName>
                <MeasureName>Billed</MeasureName>
                <MeasureName>Avg TTA (s)</MeasureName>
                <MeasureName>Avg TTC (s)</MeasureName>
              </SubtotalMeasures>
            </SubtotalSet>
          </SubtotalSets>
        </MeasureGroup>
      </MeasureGroups>
      <Parameters>
        <Parameter Name="Date  in last  (n)  days">
          <DataType>Integer</DataType>
          <Expression>
            <Literal>
              <DataType>Integer</DataType>
              <Value>14</Value>
            </Literal>
          </Expression>
        </Parameter>
      </Parameters>
      <CustomProperties>
        <CustomProperty Name="qd:PerspectiveID">
          <Value xsi:type="xsd:string">http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/udmmodeling:Perspective_Cube_DW_Text</Value>
        </CustomProperty>
      </CustomProperties>
    </SemanticQuery>
    I have created a Shared Datasource that points the the correct Analysis Services cubes that the original Report Model pointed at.
    However, I get this error when running the report:
    An error occurred during client rendering.
    An error has occurred during report processing.
    Semantic query compilation failed: e EmptySemanticQuery The SemanticQuery does not contain any Groupings or MeasureGroups. SemanticQuery must contain at least one of these elements. (SemanticQuery '').

    Actually the error above is from running the report on SSRS 2008 Native. Does anyone know why I get this error and how it may be resolved.
    Then I try to bring the report into BIDS RD and create a SDS and DataSet. The Semantic Query above is from the RD DataSet Query window.
    I get the following error when running the report in BIDS RD:
    An error occured during local processing.
    An error has occured during report processing.
    Query execution failed for dataset 'dataSet'.
    The SemanticQuery element at line 7, column 351 (namespace http://schema.microsoft.com/sqlserver/2004/10semanticmodeling) cannot appear under Envelope/Body/Execute/Command.
    So I have two errors with two scenarios. I'd like to know how to resolve one of them.
    I'd also like to know how to get the MDX from the RB/RM report so I can put it into the VS BIDS Version and get that to work properly.
    Thanks,
    Eric

  • Date and Time dimensions

    After reading the following article, I have decided to use SSAS dimension wizard for generating our Date dimension, which creates a DATETIME PK.
    http://www.made2mentor.com/2011/05/date-vs-integer-datatypes-as-primary-key-for-date-dimensions/ 
    I have also created a separate Time dimension as granularity of an hour is required.
    The Time dimension is very simple and only contains a surrogate key (INTEGER) and actual time in hours (VARCHAR).
    DimTime(TimeKey, TimeInHours)
    Our Fact table will now have a link to both the Date and Time dimension using the PK's.
    Our analysis is required by hour, day, week, month and year.
    My query is; Will this current structure cause any problems when creating MDX scripts to analyse our data (i.e. drilldown and rollup queries) Hour - Day - Week - Month - Year

    Hi Darren,
    According to your description, there a day and hour granularity in your fact table, so you want to a hierarchy like Hour - Day - Week - Month - Year, right?
    In your scenario, you created a time table that only contains a surrogate key (INTEGER) and actual time in hours (VARCHAR). We cannot create a Hour - Day - Week - Month - Year hierarchy without ant relationship between date table and time table. As per my understanding,
    you need create a foreigner key in time table, and join those table in the data source view, then you can create such a hierarchy. Here are some links about create time dimension, please see:
    http://www.ssas-info.com/analysis-services-articles/59-time-dimension/1224-date-and-time-dimensions-template
    http://www.codeproject.com/Articles/25852/Creating-Time-Dimension-in-Microsoft-Analysis-Serv
    Regards,
    Charlie Liao
    TechNet Community Support

  • Error while executing the salweek

    Hi ,
    Error while executing the salweek
    salweek_1~20110508140932~init~system_variables~-1455~ORA-01455: converting column overflows integer datatype~CURSOR FETCH: cursor=c_sys_vars
    Can anyone suggest me to solve the issue?
    Regards,
    Sushanth

    What is your RMS version????????
    Open salweek.pc, find the SQL for the cursor c_sys_vars, execute that in SQL*Plus or whatever and look for funny or very long values.
    Scan further through the Pro*C source code to where it says fetch, and check the datatype definitions of the C variables being fetched into, to be long enough to hold the variables that the cursor produces.
    Search support.oracle.com for this issue.
    If indeed a code issue with a variable type mismatch, file an SR and make sure it is patched.

Maybe you are looking for

  • New Songs Not Showing Up on Apple TV, Apple TV not in iTunes Sidebar

    I have a first-generation Apple TV. I'm able to see my library of music fine, but new additions are not showing up. I've gone into iTunes to try and sync it, but the Apple TV is no longer appearing under devices. I went ahead and turned on Home Shari

  • Opening .a7r (published file) in authorware as a.7p

    I want to change some features of an .a7r published file. How can i open it in authorware so i can alter the authorware file just like an .a7p file?

  • SQK Developer 3.0.03 generated ORA-0904 on table detail tab

    When I select the table detail tab, I get an error dialog with the following message: An error was encountered performing the requested operation: ORA-00904: "STATUS": invalid identifier 00904. 00000 - "%s: invalid identifier" *Cause: *Action: Vendor

  • Create , delete "security roles" in weblogic console - sample Security providers

    Hi Everyone: Weblogic gave out sample Security Providers for version 7.0 and 8.1. In those sample Security Provider , the author of codes used property files as Security Providers Database, however he/she didn't show how to create a Manageable Sample

  • Updating to 4.1 bricked my 3g

    Today i wanted to restore my 3g and all was fine and dandy until the last 1mm of bar left on the screen of the phone when itunes came up with the following error The iPhone "iPhone" could not be restored. An unknown error occurred (1002) and now my p