Decimal Datatype

Hi ,
I have a table in which one column is of datatype is number(13,5) if i store 35.99 it is retrieved in the same way but if i store 35.00 i retrieve it as 35.

Manaat wrote:
Hi ,
I have a table in which one column is of datatype is number(13,5) if i store 35.99 it is retrieved in the same way but if i store 35.00 i retrieve it as 35.That's the way it works. 35.00 really has no decimal precision, so why store it?
If you need to DISPLAY the data in that format, query it like ...
TUBBY_TUBBZ?select to_char(some_number, 'fm99.00')
  2  from
  3  (
  4     select 9 as some_number
  5     from dual
  6  );
TO_CHAR(SOME_NUMBE
9.00
1 row selected.
Elapsed: 00:00:00.01
TUBBY_TUBBZ?

Similar Messages

  • BIG DECIMAL DATATYPE ISSUE IN JDEV 10.1.3.2 ADF BC

    I am developing a small application on mysql db. in one of my entry screens i have to input numeric data upto a 4 decimal places.
    My project settings are SQL92 and JAVA types.
    My dataype for the numeric field in db is double(17,4) at entity level i have kept it to bigdecimal.
    When i enter something as 1200.1223 and save it . it saves correctly but when i modify the same record i get 1200.1222222292222291 value in my input box.
    can any body help what i am doing wrong?
    regards
    Amit

    Pravin
    We dont get number datatype if you have SQL92 selected as SQL Flavour. So i dont think this would help. SQL TYPE Map is JAVA basically in my project. Do you want me to import some of oracle.jbo.domains specifically or something else you want me to do
    regards
    Amit

  • Conversion of Decimal datatype

    Post Author: tanuja.patankar
    CA Forum: Data Integration
    Hi Friends,
    I am pretty new to DI 11.7 but I am experiencing a funny issue.I have a calculation in my query transform which has A/B where A is a decimal(10,2) and B is int .The output calculation column does not retain the decimal numbers .I tried the following :-
    1.Made the calculated collumn as a decimal(10,2), it didnt work.
    2.Made the collumn B to a decimal(10,2) it didnt work.
    3.Used To_char to convert the calculation in char to retain the decimal numbers, it didnt work.
    4.Used concatenation operator making the calculated column as a varchar:-'To_char(A/B)||'.'||To_Char(Mod(A,B)),it didnt work.
    5.Tried To_Decimal and to_Decimal_ext, it didnt work
    6.Tried using Cast() function , it didnt work too.
    Hence if the output of the calculation is 122.34 i would always end up getting 122.00 or 122.
    Please help and let me know if there is anyother way to go about it.
    Best Regards,
    Tanuja

    Post Author: bbatenburg
    CA Forum: Data Integration
    It seems you tried quite a lot. For problem solving you can use the validation is_valid_decimal/ is_valid_int. This should help you pinpointing the location of the problem. I always them when i encounter problems with datatypes.

  • Sql decimal datatype

    I'm using labview 7.1 with the database connectivity toolkit to interact with a sql server.  One column is of the datatype float, but when I send 0.95, it stores 0.94999999.  I've read about this before, but trying to use numeric or decimal causes a different problem.  When the column is of one of these datatypes and I do a fetch of the data, nothing in that column comes back.  I'm leaving the data as a variant in labview, so it isn't a conversion issue.  I get just a blank variant box.  It works only for float.  And the other columns all work fine. 
    Are decimal and numeric types not supported by labview, and if so how do I get around the inaccuracy of float datatypes?

    Fractional floating point numbers can often not be represented exactly in binary, even if they are nice and round in decimal.
    0.95 for example is actually 0.949999999999999955(DBL) or 0.9499999880791(SGL). There is nothing wrong with that. You simply need to set your display to only show the desired number of significant digits.
    ejoseph wrote:
    Are decimal and numeric types not supported by labview, and if so how do I get around the inaccuracy of float datatypes?
    There is no real inaccuracy. The difference between 0.94999999 and 0.95 is 0.00000001 or about 1 in 100000000! (This is just the diplayed part, the difference in real life is even less. Is your number really more precise that 52bits? (or 23bits for SGL).
    LabVIEW Champion . Do more with less code and in less time .

  • Sybase ODBC driver - numeric or decimal datatype problem

    Hello!
    I have Sybase Adaptive Server Enterprise 15.0.2 and Oracle 10.2.0 ("show release" in SQL*plus prints 1002000100) on the same machine (OS = Windows XP, name = Workstation). I wanna load correct information from the table in Sybase via Oracle database link.
    Well, I've edited tnsnames.ora, listener.ora. Also I've created initmysybase.ora in hs\admin directory. And, of course, set up DSN (using Sybase ODBC driver) via odbcad32.exe - and named it "mysybase".
    Table ("test", user = guest) definition in Sybase is:
    column "id" - int, column "data_num" - numeric(10, 5), column "data_dec" - decimal(10, 5). And it's content is: (1, 1.12345, 5.54321). I've set up a database link.
    My problem is that whenever I do the SELECT statement (SELECT * FROM "guest.test"@mysybase) I get 0 (zero) for both data_num and data_dec columns.
    Status of investigation:
    The "describe" command in SQL*plus returns:
    id NOT NULL NUMBER(10)
    data_num NUMBER(10,5)
    data_dec NUMBER(10,5)
    UPDATE statement works perfectly.
    I've downloaded a trial version of ODBC drivers from www.datadirect.com and all works fine.
    So, I believe that maybe there are some bugs in ODBC driver from Sybase, or maybe I should configure smth.
    My initmysybase.ora:
    HS_FDS_CONNECT_INFO = mysybase
    # HS_FDS_TRACE_LEVEL = DEBUG
    HS_FDS_TRACE_LEVEL = ON
    HS_NLS_NUMERIC_CHARACTER = ",."
    HS_LANGUAGE = American
    tnsnames.ora:
    mysybase =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = WORKSTATION)(PORT = 1521))
    (CONNECT_DATA =
    (SID = mysybase)
    (HS = OK)
    listener.ora:
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (ADDRESS = (PROTOCOL = TCP)(HOST = WORKSTATION)(PORT = 1521))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = mysybase)
    (SID_NAME = mysybase)
    (ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
    (PROGRAM = hsodbc)
    So, maybe anybody know how to solve this problem?
    Thanks,
    Yury

    I've played with HS_LANGUAGE option but without success.
    Well, this is the export from the registry:
    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\mysybase]
    "Driver"="C:\\sybase\\DataAccess\\ODBC\\dll\\sybdrvodb.dll"
    "dsprincipal"=""
    "secondaryport"=""
    "logintimeout"="10"
    "dsn"="mysybase"
    "restrictmaximumpacketsize"="0"
    "initializationstring"=""
    "database"=""
    "packetsize"=""
    "ignoreerrorsifrspending"="0"
    "dsservicename"=""
    "server"="WORKSTATION"
    "serverinitiatedtransactions"="1"
    "quotedidentifier"="0"
    "charset"="ServerDefault"
    "ansinull"="0"
    "encryptpassword"="0"
    "fetcharraysize"="25"
    "language"=""
    "buffercachesize"="20"
    "trustedfile"=""
    "port"="5000"
    "userid"="sa"
    "hasession"="0"
    "tightlycoupledtransaction"="0"
    "serverprincipal"=""
    "enableserverpacketsize"="1"
    "applicationname"=""
    "description"=""
    "dsurl"=""
    "userprincipal"=""
    "dynamicprepare"="0"
    "crc"="0"
    "secondaryserver"=""
    "textsize"=""
    "clienthostproc"=""
    "clienthostname"=""
    "codepagetype"="oem"

  • How to handle DECIMAL MySQL datatype converted to DOUBLE in OBIEE 10gR3?

    Dear all,
    I have a problem in OBIEE 10g namely I use MySQL database as direct datasource to OBI server and I have a column in a table in MySQL which was designed as DECIMAL datatype (18,0).
    This column is used for measuring a duration, and the values are figured in seconds (without decimals), in form like:
    '1200'
    in MySQL database.
    After import the related MySQL table to OBI repository, the OBIEE converts the column in DECIMAL datatype to DOUBLE PRECISION datatype automatically.
    My object is to achieve values in such form, certainly in duration sense (not in time !):
    hh mm ss
    In order to accomplish it I've tried to change the column format with function ROUND:
    ROUND(db.table.column / *3600*, 2)
    The problem is that it works well only if the values can be divided with no remainder e.g.
    original value: 7200
    new value (ROUND): 2
    In case of my example:
    original value: 1200
    new value (ROUND): 0
    This is wrong, because 1200 seconds are not equal with 0 hour, I wish to see there either _0.33333_ hours OR I prefer much more _0 hour 20 min_
    Have somebody any ideas?
    I've tried to make a view in database and import it as CHAR datatype to database but it is not solution also, because if I filter in BI application or try to make a SUM the BI would drop errors..
    Regards,
    Laszlo

    Hi,
    Refer this links,this is exactly fulfill your requirement.
    OBIEE 11g - Change seconds to DD HH:MM:SS format
    OBIEE Functions
    share the updates..... :)
    mark if helpful/correct....

  • Number(p,s) data type in oracle 11g is not storing places after decimal

    I have noticed in toad that if my source is somthing like '111' it is not getting converted to 111.00 when it is being stored as number (15,2) .
    however decimal datatype would worK i think or is there a setting on toad that is turning off the visiblty.please throw light on this

    read http://download.oracle.com/docs/cd/A81042_01/DOC/server.816/a76965/c10datyp.htm#743 especially Internal Numeric Format
    Regards
    Etbin
    Edited by: Etbin on 15.10.2011 0:13
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1619552483055 more about number datatype

  • 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

  • PLSQL Decimal

    HI,
    How to use Number / Decimal datatype in pl/sql stored procedure?
    If I define(Spec & Body) like this it's giving an error
    Amount     IN     NUMBER(10,2) DEFUALT 0
    Amount     IN     DECIMAL(10,2) DEFUALT 0

    You should not specify the scale and precision while defining the in parameters of the procedure. If you want to limit the precision, do it inside the procedure or just pass with desired precision.
    This shall help you:
    SQL> set serveroutput on
    SQL> create or replace procedure abc(c1 in number(10,2) default 0) as
      2  begin
      3       dbms_output.put_line(c1);
      4  end;
      5  /
    Warning: Procedure created with compilation errors.
    SQL> show error
    Errors for PROCEDURE ABC:
    LINE/COL ERROR
    1/27     PLS-00103: Encountered the symbol "(" when expecting one of the
             following:
             := . ) , @ % default character
             The symbol ":=" was substituted for "(" to continue.
    1/34     PLS-00103: Encountered the symbol "DEFAULT" when expecting one of
             the following:
             ) , * & = - + < / > at in is mod not rem <an exponent (**)>
             <> or != or ~= >= <= <> and or like between overlaps || year
             DAY_
             The symbol "* was inserted before "DEFAULT" to continue.
    LINE/COL ERROR
    SQL> create or replace procedure abc(c1 in number default 0) as
      2  begin
      3       dbms_output.put_line(c1);
      4  end;
      5  /
    Procedure created.
    SQL> Exec abc;
    0
    PL/SQL procedure successfully completed.
    SQL> exec abc(10);
    10
    PL/SQL procedure successfully completed.
    SQL> exec abc(10.22);
    10.22
    PL/SQL procedure successfully completed.
    SQL> exec abc(1000.22324);
    1000.22324
    PL/SQL procedure successfully completed.
    SQL>

  • Decimal of SQL Server getting converted to Whole number in ORACLE

    Hi All,
    I am using ORACLESQL Developer tool to migrate database from SQL Server to ORACLE. The decimal datatype in Sql Server is not getting converted to its equivalent in ORACLE. Do anyone face the same problem? Its getting converted to WHOLE number.
    Also I am able to import data only from Excel sheet. Is therre any other option to import data using this tool?
    Also is the tool the best to use for migration? Please give me your suggestions pls since I am facing this conversion problem after import lakhs of data.
    I am using version 1.1.3
    Thanks in Advance,
    Srinivasan.T

    I have upgraded to the version mentioned by you. Even now it is not getting upgraded. I am exporting data using Excel sheet only. Is it possible for you to explain how to migrate data thru SQL * PLUS?
    Thanks,
    Srinivasan.T

  • Decimal  data type package name  oracle 9i

    Dear Friends,
    Can any one tell me , Package name of decimal datatype in oracle 9i.please........
    Thank you

    not clear
    check to this
    ANYDATA TYPE A self-describing data instance type containing an
    instance of the type plus a description
    ANYDATASET TYPE Contains a description of a given type plus a set of data
    instances of that type
    ANYTYPE TYPE Contains a type description of any persistent SQL type,
    named or unnamed, including object types and
    collection types; or, it can be used to construct new
    transient type descriptions

  • LR3 - SimpleViewer Gallery update not working - white X's

    I'm using LR3, under the WEB panel, trying to export a SimpleViewer gallery to my website through the upload feature. I've set my path directories, but when updating a gallery page, the SimpleViewer thumbs and pictures come up with big white X's.
    Obviously the photos are missing, how do I fix this? I'm just  wanting to replace a old gallery with the newer, more updated photo gallery -- I'm using the same path/directory for the replacement of the older file. I think it has something to do wit the XML file that is being written?
    Can someone help me w/this?
    Here is an example of a perfectly fine FUNCTIONING gallery and BROKEN gallery:
    FUNCTIONING LINK:
    http://garyswenor.com/fineart.html
    BROKEN LINK SAMPLE:
    http://garyswenor.com/portraits.html

    Hi Narayanan,
    I am not aware of any known problem with decimal datatype as never faced any.
    However, I would suggest you to put a external breakpoint in BAPI to see what value it is receiving from .NET application.
    Just login into SAP GUI. Run SE37 transaction. Type the name of BAPI. Go to  the source code, click on the line of code you want to set breakpoint. Then from the toolbar menu either click on the External Breakpoint icon or from Top menu go to "Utilities->External Breakpoints."
    Now run the VB .NET application in debug mode. When the execution hits the breakpoint in BAPI you can check the values of parameters by just clicking on them inside the code.
    Do let me know what value do you see there.
    And thank you for the "helpful answer point"
    Regards.

  • 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.

  • Error 136 Functions that can be compossed must declare a return type

    Hello,
    I have downloaded the EF Final Release driver and Im working with Oracle 11g express.
    I have the following Procedure:
    PROCEDURE ProductosPedido(
    Datos Out SYS_RefCursor) IS
    BEGIN
    OPEN Datos FOR
    SELECT Nombre,
    TO_NUMBER(Precio * (SELECT SUM(unidades)
    FROM DETALLES_PEDIDO
    WHERE PRODUCTO = PRODUCTO.ID)) Importe
    FROM PRODUCTO;
    END;
    And the following config section:
    <oracle.dataaccess.client>
    <settings>
    <add name="System.Productospedido.RefCursor.Datos" value="implicitRefCursor bindinfo='mode=Output'"/>
    <add name="System.Productospedido.RefCursorMetaData.Datos.Column.0" value="implicitRefCursor metadata='ColumnName=Nombre;BaseColumnName=Nombre;BaseSchemaName=System;BaseTableName=Producto;NativeDataType=nvarchar2;ProviderType=NVarchar2;DataType=System.String;ColumnSize=50;AllowDBNull=true;IsKey=false'" />
    <add name="System.Productospedido.RefCursorMetaData.Datos.Column.1" value="implicitRefCursor metadata='ColumnName=Importe;NativeDataType=number;ProviderType=Decimal;DataType=System.Decimal;AllowDBNull=false;IsKey=false;ColumnSize=8'" />
    </settings>
    </oracle.dataaccess.client>
    I have imported succesfully in my EF Model, but when I try to consume the Procedure it gives me Error 136 Functions that can be compossed must declare a return type
    Any solutions?
    Thanks and best regards!

    A stored procedure does not have a ReturnType, therefore IsComposable="false" and it cannot be used in LINQ queries.
    This limitation is imposed by EF and not by ODP.
    You may want to create a stored function which has a ReturnType ref cursor, and include this stored function into your model. Then, under the same namespace, you create a class with a "stub" method/function and use EdmFunction() to map this stub to the stored function. For example,
    class myFuncClass
    [EdmFunction("Model.Store", "MY_STORED_FUNC_1")]
    public static <your_complex_type_or_DbDataRecord> MyFunc_1(int? column1, ...)
    throw new NotSupportedException("Direct calls are not supported");
    You should be able to call myFuncClass.MyFunc_1(x) in your LINQ query. Your stored function MY_STORED_FUNC_1 will be called in the generated query.

  • Help me fix the errors

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    namespace BankApplication
    class Program
    static void Main(string[] args)
    String AccountName = " ";
    float Balance = 0f;
    Boolean quit = false;
    int userChoice;
    Console.WriteLine("please Chose what to do:");
    Console.WriteLine("1. Create Acount");
    Console.WriteLine("2. Deposit cash");
    Console.WriteLine("3. Withdraw Cash");
    Console.WriteLine("4. Chech balance");
    Console.WriteLine("or 0. to quit");
    userChoice = Console.Read();
    switch(userChoice)
    case 1:
    string name;
    Console.WriteLine("please enter account name");
    name = Console.ReadLine();
    if (name==name)
    Console.WriteLine("name alredy exist");
    else
    AccountName += name;
    Console.WriteLine("Account Name ", name);
    break;
    case 2:
    float amount;
    Console.WriteLine("Amount to deposit: ");
    amount = Console.Read();
    if (amount <= 0){
    Console.WriteLine("Can't deposit nonpositive amount.");
    else {
    Balance += amount;
    Console.WriteLine("R" + amount + " has been deposited.");
    break;
    case 3:
    Console.WriteLine("Amount to withdraw: ");
    amount = Console.Read();
    if (amount <= 0 || amount > Balance)
    Console.WriteLine("Withdrawal can't be completed.");
    else {
    Balance -= amount;
    Console.WriteLine("R" + amount + " has been withdrawn.");
    break;
    case 4:
    Console.WriteLine("Your balance: R" + Balance);
    break;
    case 0:
    quit = true;
    break;
    default:
    Console.WriteLine("Wrong choice.");
    break;
    while(!quit);
    Console.WriteLine("BIY!");

    In addition to the other good advice already posted, I suggest that you NOT us the float datatype for the balance, as you may encounter rounding errors.
    Use the decimal datatype instead.
    Instead of:
    float Balance
    = 0f;
    use:
    decimal Balance = 0d;
    Read here:
    https://msdn.microsoft.com/en-us/library/364x0z75.aspx?f=255&MSPPError=-2147217396
    "the decimal type has more precision and a smaller range, which makes it appropriate for financial and monetary calculations."

Maybe you are looking for

  • How can I move email archive from XP laptop to MacBook Air?

    I have a large archive of emails in Thunderbird on my XP Vaio laptop. How do I shift them all to my new Mac Book Air? I tried following the instructions, which sent me to this section: How to find your profile Click on the menu button or menu bar. Fr

  • IPhone wont let me listen to music or update apps

    Hello. When i go to the Music app and press a song it freezes and doesn't play it or it will be on play but it will just be at 0:00 and not start the song. I always try to turn up the volume but it freezes and doesn't work. I ushally have to double c

  • Can I set up a message-listener on a temporary destination?

    //Given session exists Topic tempTopic = session.createTemporaryTopic(); TopicSubscriber receiver = session.createSubscriber(tempTopic); //Topic is a named topic defined using Admin tool. TopicPublisher sender = session.createPublisher(topic); sessio

  • 9.2.0.7 Catpatch.sql hangs

    Windows 2000 9.2.0.1 I've applied the 9.2.0.7 to my db successfully, but when I run catpatch.sql in migrate mode, the system gets to a certain point and hangs. I thought maybe since the db was a 15G db restored from a cold backup that maybe it was a

  • Error "Unable to Load URL" in Dashboard Design 4.1 SP2 while create web service connection

    Hello Experts, I am using SAP BO Dashboard Design 4.1 SP2. I have create one web Intelligence report and from it i create web services url using of publish data feature. when I use this url to create Web service(Qaaws) connection in dashboard It is s