Error when creating user defined TYPE

Hi
I have an object type created as follows
create type emp_add is object(empno number(3),street varchar2(50),zipcode number(6));
when I create a type based on the Object created above using
create type add_rec is emp_add;
I am getting compilation error
SQL> sho err
Errors for TYPE ADD_REC:
LINE/COL ERROR
1/17 PLS-00103: Encountered the symbol "EMP_ADD" when expecting one of
the following:
array VARRAY_ table object fixed varying opaque sparse
How can I get rid of this error.I am a Beginner in Oracle database development.
Thanks in advance

Do this ->
satyaki>
satyaki>create type emp_add is object(empno number(3),street varchar2(50),zipcode number(6));
  2  /
Type created.
Elapsed: 00:00:07.77
satyaki>
satyaki>create or replace type add_rec as table of emp_add;
  2  /
Type created.
Elapsed: 00:00:00.96
satyaki>
satyaki>Regards.
Satyaki De.

Similar Messages

  • 8i personal : error when Create user defined aggregate function

    Hi,
    I have problem on creating user defined aggregate function.
    I try to create the sample aggregate function "SecondMax" from 9i developer guide(append at the end of this post).
    It's work to create object type and the type body, but
    there is error when I create the aggregate function..
    "CREATE FUNCTION SecondMax (input NUMBER) RETURN NUMBER
    PARALLEL_ENABLE AGGREGATE USING SecondMaxImpl;"
    I am using 8i personal now.. is that the syntax of create function in 9i is different from that in 8i?
    Example: Creating and Using a User-Defined Aggregate
    This example illustrates creating a simple user-defined aggregate function SecondMax() that returns the second-largest value in a set of numbers.
    Creating SecondMax()
    Implement the type SecondMaxImpl to contain the ODCIAggregate routines.
    create type SecondMaxImpl as object
    max NUMBER, -- highest value seen so far
    secmax NUMBER, -- second highest value seen so far
    static function ODCIAggregateInitialize(sctx IN OUT SecondMaxImpl)
    return number,
    member function ODCIAggregateIterate(self IN OUT SecondMaxImpl,
    value IN number) return number,
    member function ODCIAggregateTerminate(self IN SecondMaxImpl,
    returnValue OUT number, flags IN number) return number,
    member function ODCIAggregateMerge(self IN OUT SecondMaxImpl,
    ctx2 IN SecondMaxImpl) return number
    Implement the type body for SecondMaxImpl.
    create or replace type body SecondMaxImpl is
    static function ODCIAggregateInitialize(sctx IN OUT SecondMaxImpl)
    return number is
    begin
    sctx := SecondMaxImpl(0, 0);
    return ODCIConst.Success;
    end;
    member function ODCIAggregateIterate(self IN OUT SecondMaxImpl, value IN number)
    return number is
    begin
    if value > self.max then
    self.secmax := self.max;
    self.max := value;
    elsif value > self.secmax then
    self.secmax := value;
    end if;
    return ODCIConst.Success;
    end;
    member function ODCIAggregateTerminate(self IN SecondMaxImpl, returnValue OUT
    number, flags IN number) return number is
    begin
    returnValue := self.secmax;
    return ODCIConst.Success;
    end;
    member function ODCIAggregateMerge(self IN OUT SecondMaxImpl, ctx2 IN
    SecondMaxImpl) return number is
    begin
    if ctx2.max > self.max then
    if ctx2.secmax > self.secmax then
    self.secmax := ctx2.secmax;
    else
    self.secmax := self.max;
    end if;
    self.max := ctx2.max;
    elsif ctx2.max > self.secmax then
    self.secmax := ctx2.max;
    end if;
    return ODCIConst.Success;
    end;
    end;
    Create the user-defined aggregate.
    CREATE FUNCTION SecondMax (input NUMBER) RETURN NUMBER
    PARALLEL_ENABLE AGGREGATE USING SecondMaxImpl;
    Using SecondMax()
    SELECT SecondMax(salary), department_id
    FROM employees
    GROUP BY department_id
    HAVING SecondMax(salary) > 9000;

    This could be a x64/x86 problem. Try following this thread
    [GetCompanyService|GetCompanyService] and recompile your code for the platform you need.

  • Error when Create User Defined Field

    Hi all, i got an error when create UDF
    Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
    Here is part of my code
    oUserFieldMD.Name = fieldname
            oUserFieldMD.Description = fielddesc
            oUserFieldMD.Type = fieldtype
            oUserFieldMD.DefaultValue = defaultValue.ToString()
            If fieldtype <> SAPbobsCOM.BoFieldTypes.db_Date Then
                oUserFieldMD.Size = fieldlength
                oUserFieldMD.EditSize = fieldlength
            End If
            If fieldtype = SAPbobsCOM.BoFieldTypes.db_Float Then
                oUserFieldMD.SubType = SAPbobsCOM.BoFldSubTypes.st_Price
            Else
                oUserFieldMD.SubType = SAPbobsCOM.BoFldSubTypes.st_None
            End If
            oUserFieldMD.TableName = tablename
            lRetVal = oUserFieldMD.Add()
            prgbar.Value = prgbar.Value + 1
            If (lRetVal <> 0) Then
                msgs.Add(tablename & " - " & fieldname & " : " & oCompany.GetLastErrorDescription())
            Else
                msgs.Add(tablename & " - " & fieldname & " : successfully created!")
            End If
    the error come when reach lRetVal = oUserFieldMD.Add()
    what is wrong with my code ?
    thanks.

    This could be a x64/x86 problem. Try following this thread
    [GetCompanyService|GetCompanyService] and recompile your code for the platform you need.

  • Create user defined type under SQL type

    Hello guys,
    I have a table PART_NEEDED and a table function which returns table of PART_NEEDED%ROWTYPE. This works fine but if I try to create new user defined type with with the same attributes as PART_NEEDED and pipe the rows into table of that type I am getting an inconsistency of types error - Error(30,16): PLS-00382: expression is of wrong type.
    Please refer to the script below. I appreciate any help!
    CREATE TABLE "TOSS"."PART_NEEDED"
    "PART_NEEDED_ID" NUMBER NOT NULL ENABLE,
    "TYPE_OF_PART_NEEDS_ID" NUMBER,
    "TYPE_OF_PART_IS_NEEDED_ID" NUMBER,
    "AMOUNT" NUMBER
    SEGMENT CREATION IMMEDIATE PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE
    INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT
    TABLESPACE "USERS" ;
    CREATE OR REPLACE TYPE "TYPE_PART_NEEDED" AS OBJECT
    ID NUMBER,
    PART_ID NUMBER,
    SUB_PART_ID NUMBER,
    AMOUNT NUMBER
    create or replace package KOLEV_ADMIN_PKG as
    TYPE TYPE_PART_NEEDED_TBL IS TABLE OF TOSS.TYPE_PART_NEEDED; -- if the type here is PART_NEEDED%ROWTYPE it works perfectly fine
    FUNCTION GET_SUBPARTS (IN_PART_ID IN NUMBER)
    RETURN TYPE_PART_NEEDED_TBL PIPELINED;
    end;
    CREATE OR REPLACE PACKAGE BODY "KOLEV_ADMIN_PKG" AS
    FUNCTION GET_SUBPARTS (IN_PART_ID IN NUMBER)
    RETURN TYPE_PART_NEEDED_TBL PIPELINED
    IS
    R_TBL TYPE_PART_NEEDED_TBL; -- To be returned
    BEGIN
    FOR R IN (
    WITH
    SUBPARTS(ID, PART_ID, SUBPART_ID, AMOUNT) AS
    SELECT PART_NEEDED_ID, TYPE_OF_PART_NEEDS_ID, TYPE_OF_PART_IS_NEEDED_ID, AMOUNT
    FROM PART_NEEDED
    WHERE TYPE_OF_PART_NEEDS_ID = IN_PART_ID
    UNION ALL
    SELECT PN.PART_NEEDED_ID, PN.TYPE_OF_PART_NEEDS_ID, PN.TYPE_OF_PART_IS_NEEDED_ID, PN.AMOUNT
    FROM SUBPARTS SP, PART_NEEDED PN
    WHERE PN.TYPE_OF_PART_NEEDS_ID = SP.SUBPART_ID
    SELECT SP.ID, SP.PART_ID, SP.SUBPART_ID, SP.AMOUNT
    FROM SUBPARTS SP
    ORDER BY PART_ID
    LOOP
    PIPE ROW(R); -- Error(30,16): PLS-00382: expression is of wrong type
    END LOOP;
    RETURN;
    END GET_SUBPARTS;
    END "KOLEV_ADMIN_PKG";
    INSERT INTO "TOSS"."PART_NEEDED" (PART_NEEDED_ID, TYPE_OF_PART_NEEDS_ID, TYPE_OF_PART_IS_NEEDED_ID, AMOUNT) VALUES ('4', '2', '3', '2')
    INSERT INTO "TOSS"."PART_NEEDED" (PART_NEEDED_ID, TYPE_OF_PART_NEEDS_ID, TYPE_OF_PART_IS_NEEDED_ID, AMOUNT) VALUES ('5', '3', '1', '2')
    INSERT INTO "TOSS"."PART_NEEDED" (PART_NEEDED_ID, TYPE_OF_PART_NEEDS_ID, TYPE_OF_PART_IS_NEEDED_ID, AMOUNT) VALUES ('3', '2', '1', '4')
    INSERT INTO "TOSS"."PART_NEEDED" (PART_NEEDED_ID, TYPE_OF_PART_NEEDS_ID, TYPE_OF_PART_IS_NEEDED_ID, AMOUNT) VALUES ('17', '3', '4', '1')
    Database Release 11.2.0.1.0
    I want this functionality because I need to make some joins and add descriptions for each part. Now this table PART_NEEDED contains only IDs - many to many.
    Regards!
    Edited by: Todor Kolev on Mar 3, 2012 12:47 PM

    CREATE OR REPLACE
      PACKAGE BODY KOLEV_ADMIN_PKG
        AS
          FUNCTION GET_SUBPARTS (IN_PART_ID IN NUMBER)
            RETURN TYPE_PART_NEEDED_TBL PIPELINED
            IS
            BEGIN
                FOR R IN (
                          WITH SUBPARTS(ID, PART_ID, SUBPART_ID, AMOUNT)
                            AS (
                                 SELECT  PART_NEEDED_ID,
                                         TYPE_OF_PART_NEEDS_ID,
                                         TYPE_OF_PART_IS_NEEDED_ID,
                                         AMOUNT
                                   FROM  PART_NEEDED
                                   WHERE TYPE_OF_PART_NEEDS_ID = IN_PART_ID
                                UNION ALL
                                 SELECT  PN.PART_NEEDED_ID,
                                         PN.TYPE_OF_PART_NEEDS_ID,
                                         PN.TYPE_OF_PART_IS_NEEDED_ID,
                                         PN.AMOUNT
                                   FROM  SUBPARTS SP,
                                         PART_NEEDED PN
                                   WHERE PN.TYPE_OF_PART_NEEDS_ID = SP.SUBPART_ID
                          SELECT  TYPE_PART_NEEDED(
                                                   SP.ID,
                                                   SP.PART_ID,
                                                   SP.SUBPART_ID,
                                                   SP.AMOUNT
                                                  ) O
                            FROM  SUBPARTS SP
                            ORDER BY PART_ID
                         ) LOOP
                  PIPE ROW(R.O);
                END LOOP;
                RETURN;
          END GET_SUBPARTS;
    END KOLEV_ADMIN_PKG;
    /SY.

  • Create user-defined type

    Can I create a user-defined type with a range between 1 to 10.
    e.g. insert into table values (udt(11)) will prompt an error

    You will need to either provide different names for the
    constraints or let the system provide the names, like this:
    SET     ECHO OFF
    SET     FEEDBACK OFF
    SET     PAGESIZE 0
    SPOOL   add_constraints.sql
    SELECT 'ALTER TABLE ' || table_name
       || ' ADD CHECK (udt BETWEEN 1 AND 10);'
    FROM    user_tab_columns
    WHERE   column_name = 'UDT';
    SPOOL   OFF
    SET     PAGESIZE 24
    SET     FEEDBACK ON
    SET     ECHO ON
    START   add_constraints

  • Error when use User-Defined Function

    I just create User defined function "getfilename" and I put there:
    "DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    return ourSourceFileName; ".
    But In test mapping I have worning:
    "Runtime exception during processing target field mapping /ns1:Z_KBFI_INPUT_FILE/IS_IFILE/FILE_NAME. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._KBFIMsgMapping_ method get_fname$[com.sap.aii.mappingtool.tf3.rt.Context@37d4662c] com.sap.aii.mappingtool.tf3.MessageMappingException: Runtime exception during processing target field mapping /ns1:Z_KBFI_INPUT_FILE/IS_IFILE/FILE_NAME. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._KBFIMsgMapping_ method get_fname$[com.sap.aii.mappingtool.tf3.rt.Context@37d4662c] at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:284) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:238)...."
    And in RWB in Communication Channel Monitoring I can not see file name in the payload.
    Maby I do something wrong, please tell me.

    my source file 200610.txt is like this:
    HR 0610 061030 061021
    DR 03 C 0610 820114 00010111 0000015000 PLN descr...
    DR 03 D 0610 403201 00010111 0000015000 PLN descr..
    TR 0000000002
    Then in sxmb_moni in inbound message (payload) I have:
    <?xml version="1.0" encoding="utf-8" ?>
    - <ns:KBFIMsgTypeSource xmlns:ns="http://p4.org/xi/KBFI/Interface">
    - <FIRecordset>
    - <HeaderLine>
      <LineKey>HR</LineKey>
      <PostingPeriod>0610</PostingPeriod>
      <PostingEndDate>061030</PostingEndDate>
      <PostingDate>061021</PostingDate>
      </HeaderLine>
    - <PostingLine>
      <LineKey>DR</LineKey>
      <ServerID>03</ServerID>
      <DCFlag>C</DCFlag>
      <PostingPeriod>0610</PostingPeriod>
      <GLAccount>820114</GLAccount>
      <SubAccount>00010111</SubAccount>
      <NetValue>0000015000</NetValue>
      <Currency>PLN</Currency>
      <Description>descr...</Description>
      </PostingLine>
    - <PostingLine>
      <LineKey>DR</LineKey>
      <ServerID>03</ServerID>
      <DCFlag>D</DCFlag>
      <PostingPeriod>0610</PostingPeriod>
      <GLAccount>403201</GLAccount>
      <SubAccount>00010111</SubAccount>
      <NetValue>0000015000</NetValue>
      <Currency>PLN</Currency>
      <Description>descr..</Description>
      </PostingLine>
      </FIRecordset>
      </ns:KBFIMsgTypeSource>
    But I don't have payload for Response (black and white flag).
    In DynamicConfiguration i have:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Response
      -->
    - <SAP:DynamicConfiguration xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="SourceFileSize">141</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileType">txt</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="SourceFileTimestamp">20061212T121622Z</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileEncoding">ISO646-US</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">200610.txt</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="Directory">/usr/sap/PXD/put/archive</SAP:Record>
      </SAP:DynamicConfiguration>

  • Getting error when run user defined transaction code

    Hi there,
    I created one ZTcode by using standard Tcode's program and screen number. When I run this Ztcode,  shows an error "Error when access file TC10 Ztcode" on taskbar. What is problem, pls reply.
    ur answer is most useful.
    Regards,
    Zakir Khan.

    TC10 stores information related to SAP transaction like TC10-TRTYP which give the type of transaction (display, edit, initial)
    The standard program check in this table (and other TC*) how it should perform.
    Way to solve the problem
    - try defining you Z-transaction by referencing standard transaction, not giving the program/dynpro.
    - If that don't work you may have to duplicate the called program and then override sy-tcode by the original value in the program before accessing tables TC*
    - Other way is to duplicate records in table TC10 and other tables
    Regards

  • DI error when binding user defined table

    Hi,
    I am using matrix. Im binding a User defined table '@NEW' to a Datasource
    oForm.DataSources.DBDataSources.Add("@NEW")
    I also bind the fields to column of the matrix as given below
    oColumn = oColumns.Item("CodeNo")
    oColumn.DataBind.SetBound(True, "@NEW", "U_CodeNo")
    When the table @New contains no records i get error while binding the fields to the matrix.
    I tried the same using STANDARD SAP tables.I am not getting any error and it works fine.
    Can anyone help me?

    Hi,
    I am using matrix. Im binding a User defined table '@NEW' to a Datasource
    oForm.DataSources.DBDataSources.Add("@NEW")
    I also bind the fields to column of the matrix as given below
    oColumn = oColumns.Item("CodeNo")
    oColumn.DataBind.SetBound(True, "@NEW", "U_CodeNo")
    When the table @New contains no records i get error while binding the fields to the matrix.
    I tried the same using STANDARD SAP tables.I am not getting any error and it works fine.
    Can anyone help me?

  • LDAD Time Sync Error when creating user

    Hi, we have a web service for eDirectory 8.8 SP5 that creates a few
    users and does a couple other services. When the web service it
    configured to connect to 1 of the 2 eDirectory servers (1 is a master,
    and the other is read/write replica) then everything works just fine
    (both server work just fine as long as you only connect to one of them
    only). However, we tried to add redundancy by putting a load balancer
    in front of the 2 eDir servers. When we use the VIP to make the LDAP
    connection, we keep on getting this error when we try to create a user:
    Caused by: LDAPException: Other (80) Other
    LDAPException: Server Message: NDS error: time not synchronized (-659)
    LDAPException: Matched DN:
    at com.novell.ldap.LDAPResponse.getResultException(Un known Source)
    at com.novell.ldap.LDAPResponse.chkResultCode(Unknown Source)
    at com.novell.ldap.LDAPConnection.chkResultCode(Unkno wn Source)
    at com.novell.ldap.LDAPConnection.modify(Unknown Source)
    at com.novell.ldap.LDAPConnection.modify(Unknown Source)
    I've ran ndsrepair -T and the time looks like it is synched and both
    servers are running NTP. Do you know what could be causing this
    problem? Also, it isn't the LB connection itself b/c everything works
    fine if we disable one of the servers in the LB and still use the VIP
    just to connect to just 1 server.
    Thanks
    Kalin35
    Kalin35's Profile: http://forums.novell.com/member.php?userid=72672
    View this thread: http://forums.novell.com/showthread.php?t=421486

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1
    Can you tell us more about the changes taking place? For example, I
    believe this can happen if you modify objectA on replica0 and then modify
    objectA in another way on replica1. Timestamps on objects are made up of
    the seconds since 1970 followed by a replica number (each replica's is
    unique) and then an event number. As a result perhaps eDir feels time is
    out of sync when it makes a change on a box and then the other replica
    synchronizes in changes it received just a second earlier from your
    application. It may be tricky to isolate if this is the case but it
    should be possible with a bit of analysis. In the meantime you may want
    to ensure your application (or your VIP) batches changes to one box and
    then to the other as much as possible. The benefit of multi-master
    replication (which eDirectory does by default) is you can write changes to
    multiple boxes simultaneously, but the challenge is the same and requires
    a way to resolve differences using transitive vectors which are made up of
    those timestamps.
    Good luck.
    On 09/21/2010 04:06 PM, Kalin35 wrote:
    >
    > Hi, we have a web service for eDirectory 8.8 SP5 that creates a few
    > users and does a couple other services. When the web service it
    > configured to connect to 1 of the 2 eDirectory servers (1 is a master,
    > and the other is read/write replica) then everything works just fine
    > (both server work just fine as long as you only connect to one of them
    > only). However, we tried to add redundancy by putting a load balancer
    > in front of the 2 eDir servers. When we use the VIP to make the LDAP
    > connection, we keep on getting this error when we try to create a user:
    >
    > Caused by: LDAPException: Other (80) Other
    > LDAPException: Server Message: NDS error: time not synchronized (-659)
    > LDAPException: Matched DN:
    > at com.novell.ldap.LDAPResponse.getResultException(Un known Source)
    > at com.novell.ldap.LDAPResponse.chkResultCode(Unknown Source)
    > at com.novell.ldap.LDAPConnection.chkResultCode(Unkno wn Source)
    > at com.novell.ldap.LDAPConnection.modify(Unknown Source)
    > at com.novell.ldap.LDAPConnection.modify(Unknown Source)
    >
    >
    > I've ran ndsrepair -T and the time looks like it is synched and both
    > servers are running NTP. Do you know what could be causing this
    > problem? Also, it isn't the LB connection itself b/c everything works
    > fine if we disable one of the servers in the LB and still use the VIP
    > just to connect to just 1 server.
    >
    > Thanks
    >
    >
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.15 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
    iQIcBAEBAgAGBQJMmTgcAAoJEF+XTK08PnB5F70QAI2FqxmouS Ljb2CZYOgEPE14
    8sIKFJmskkQJBInS41vT0HOllbKzTQwVel99facLbr425piggC X6tN9r0U4Pnoil
    0jBdjb/HX6qy1E1gcCQWlMLFNjKw7pG8kY+iT+lteAjrjU0h5uJB2JYoX 5KXaKQX
    8GDCW38mXuWLX6x9WEwZ0WXMlU/Xbynjs8R1k9LY34pxK9Map2pADZKO8TT7V8Hs
    zG7ZMmsMeos/3vgbc5sUmflGGpmivmhihp7RZE8ME5FvKRC1ximsaEqLrWNrpT 1H
    IAnnBgG5vdcOcDDIiYKnTIj2JYMhb4JapxaNyQurIDgAbBQo1g yyWmYJlRfe+pQP
    TjIQHRTVZQdy4Y98G2RisNbSwZMv8zC1buDDq1njCYS/OO/3rqo3/yL5bh2n/pjf
    e6WMVAzsihd/csc9vOW7Z/9X0apKrckZUorhftdrEJCWOdnOXOx1MaZXhl0ppAKy
    sdJU12wdFMUi32F79yjxrcriUq/Hh3w76vT9nVXUR9XuSIXR77uuWtvBt/qSNAqt
    9IOL64jMHPw/AGyBTrvdp+Xz8MVkVzwXotctamACVmTeZ6bhFzPigfZ72zTQwH DV
    QNF3Mql5hw1LdgwytgeIzbAuHYZdml2b2e+esU5DkEZNegpFYj gptZSAohzTCQMH
    pY9I+p8g4ca4urXWtzpp
    =AZgR
    -----END PGP SIGNATURE-----

  • Strange errors when using user defined function in where clause

    Hello,
    I am having trouble with a function that, when used in the where clause of a select will cause an error if the first column selected is of type INTEGER. Not sure whether I am doing something wrong or whether this is a bug.
    Here is a very simple test case:
    create table test(
    col1 integer not null,
    col2 varchar(20) ascii default ''
    insert into test values(1,'2011-03-15 05:00:00')
    insert into test values(2,'2011-03-15 07:00:00')
    CREATE FUNCTION BTR_TAG  RETURNS VARCHAR AS
        VAR ret VARCHAR(20);
      SET ret='2011-03-15 06:00:00';
      RETURN ret;
    Select * from test where col2 >= BTR_TAG()
    Select col1,col2 from test where col2 >= BTR_TAG()
    =>  Error in assignment;-3016 POS(1) Invalid numeric constant
    Select '',* from test where col2 >= BTR_TAG()
    Select col2,col1 from test where col2 >= BTR_TAG()
    => works as it should
    MaxDB V 7.7.07.16 running on Windows Server 2003
    I can replicated the test case above with Sql Studio and other ODBC based tools.
    Thanks in advance,
    Silke Arnswald

    Hello Siva,
    sorry, but I don't understand your reply:
    This is not right forum to posting this question.
    You are from which module or working any 3rd party application.
    MaxDB 7.7.07.16 is the community version of MaxDb,
    we are not using it for SAP
    and no 3rd party software is required to reproduce my problem,
    Sql Studio or Database Studio will do.
    Regards,
    Silke Arnswald

  • Error when create user via OIM web

    Hi Gurus..
    I hava some problem when I creating new user via web OIM, error appear while inpute the start date value.
    Need help for you guys,
    This is the error code.
    <Error> <oracle.adfinternal.view.faces.config.rich.RegistrationConfigurator> <BEA-000000> <ADF_FACES-60096:Server Exception during PPR, #5
    java.lang.NullPointerException
        at oracle.iam.identitytaskflow.utils.UserManagerValidationUtils.handleAccountEndDateValidation(UserManagerValidationUtils.java:237)
        at oracle.iam.identitytaskflow.utils.UserManagerValidationUtils.processDateValidations(UserManagerValidationUtils.java:589)
        at oracle.iam.identitytaskflow.utils.UserManagerValidationUtils.processDateValidation(UserManagerValidationUtils.java:543)
        at oracle.iam.identitytaskflow.common.components.UIInputDate$DateValueValueChangeListener.processValueChange(UIInputDate.java:135)
        at javax.faces.event.ValueChangeEvent.processListener(ValueChangeEvent.java:134)
        at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcast(UIXComponentBase.java:675)
        at org.apache.myfaces.trinidad.component.UIXEditableValue.broadcast(UIXEditableValue.java:210)
        at org.apache.myfaces.trinidad.component.UIXSelectInput.broadcast(UIXSelectInput.java:216)
        at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
        at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
        at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
        at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
        at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
        at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:902)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:357)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:186)

    probably yes but I am not so sure about that, I have checked the User.xml for make sure this but I can't found something wrong. any clue Shashank?
    Regards,
    -Rius-

  • Syntax error when creating a user-defined table type in SQL Server 2012

    Why am I getting a syntax error when creating a user-defined table type in SQL Server 2014?
    CREATE TYPE ReportsTableType AS TABLE 
    ( reportId INT
    , questionId INT
    , questionOrder INT );
    Results:
    Msg 156, Level 15, State 1, Line 1
    Incorrect syntax near the keyword 'AS'.

    Hope these posts could help, 
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/37a45a9a-ed8c-4655-be93-f6e6d5ef44be/getting-incorrect-syntax-while-creating-a-table-type-in-sql-server-2008-r2?forum=transactsql
    Regards, Dineshkumar,
    Please Mark as Answer if my post answers your question and
    Vote as Helpful if it helps you

  • JPub Error User-defined type not found

    I just have found about Jpub could help me with my problem, so i try it, but when i try to publish a package it gives me this error:
    J2T-118, ERROR: User-defined type "ADMCAD.PKG_CONSULTA_BR_NOME.TAB_ELEITOR" was
    not found in the database
    This is the package:
    create or replace package admcad.pkg_consulta_br_nome as
    VT_NUM_INSCRICAO VARCHAR2(12);
    VT_COD_SIT_ELEITOR NUMBER(2);
    VT_NOM_ELEITOR VARCHAR2(70);
    VT_DAT_NASC NUMBER(8);
    VT_NUM_ZONA NUMBER(4);
    VT_SGL_UF VARCHAR2(2);
    -- tipo que sera retornado
    TYPE REC_TAB_ELEITOR IS RECORD (
              NUM_INSCRICAO VT_NUM_INSCRICAO%TYPE,
              NOM_ELEITOR     VT_NOM_ELEITOR%TYPE,
              NOM_PAI     VT_NOM_ELEITOR%TYPE,
              NOM_MAE     VT_NOM_ELEITOR%TYPE,
              DAT_NASC     VT_DAT_NASC%TYPE,
              DAT_DOMIC_MUNIC     DATE,
              COD_SIT_ELEITOR     VT_COD_SIT_ELEITOR%TYPE,
              SGL_UF     VT_SGL_UF%TYPE,
              NUM_ZONA     VT_NUM_ZONA%TYPE);
    TYPE tab_eleitor IS TABLE OF REC_TAB_ELEITOR INDEX BY BINARY_INTEGER;
    TYPE cursor_consulta IS REF CURSOR;
    SUBTYPE T_NUM_INSCRICAO is VT_NUM_INSCRICAO%TYPE;
    SUBTYPE T_COD_SIT_ELEITOR is VT_COD_SIT_ELEITOR%TYPE;
    SUBTYPE T_NOM_ELEITOR is VT_NOM_ELEITOR%TYPE;
    SUBTYPE T_NOM_PAI is VT_NOM_ELEITOR%TYPE;
    SUBTYPE T_NOM_MAE is VT_NOM_ELEITOR%TYPE;
    SUBTYPE T_DAT_DOMIC_MUNIC is date;
    SUBTYPE T_DAT_NASC is VT_DAT_NASC%TYPE;
    SUBTYPE T_SGL_UF is VT_SGL_UF%TYPE;
    SUBTYPE T_NUM_ZONA is VT_NUM_ZONA%TYPE;
    TYPE rec_consulta IS RECORD (
    num_inscricao T_NUM_INSCRICAO,
    cod_sit_eleitor T_COD_SIT_ELEITOR,
    nom_eleitor T_NOM_ELEITOR,
    nom_pai T_NOM_PAI,
    nom_mae T_NOM_MAE,
    dat_domic_munic T_DAT_DOMIC_MUNIC,
    dat_nasc T_DAT_NASC,
    sgl_uf          T_SGL_UF,
    num_zona          T_NUM_ZONA);
    procedure prc_consulta (     d01_cod_fon_nome in varchar2,
              d01_cod_fon_mae in varchar2,
              d01_dat_nasc in number,
                   d01_qtd_regs out number,
              vtab_eleitor in out tab_eleitor);
    end pkg_consulta_br_nome;
    This is the command line:
    jpub -user=XXX/XXX@there -sql=admcad.pkg_consulta_br_nome
    Am I wrong, or jpub was suppose to publish any type in the signature?
    Please help.
    Rafael Dittberner

    Rafael,
    I suggest you try asking in the Toplink discussion forum. You can find a link to it from this Web page:
    http://www.oracle.com/technology/products/ias/toplink/index.html
    Good Luck,
    Avi.

  • Error creating user defined tables: Ref count (-1120)

    Hi all !
    I have to create user defined tables per code, so I wrote <b>2 main functions</b>, first <i>to create a table</i> (with TableName,TableType and TableDescription properties)and  and <i>second to add fields</i> (to a certain table which is sent as parameter).
    I call these functions to create multiple tables. For the first 6 tables it works totally ok. But beginning from the 7th table it gives that "<b>Ref count for this object is higher then 0.</b> " (-1120) error. All parameters are ok just as the first 6 tables.
    Found such an explanation like below in help files.
    <i>The DI API allows only one instance of a meta data object at a time. This maintains data integrity by preventing any manipulation of a business object while modifying the object's user fields. Therefore, verify that no other DI object is active except the meta data object.</i>
    But why do I get such an error after sixth call of the function (but not beginning from the second table )?

    Gül,
    Have you tried doing some grbage collection?
    Search for a topic: "Add Usertables and Fields while having a recordset"
    HTH
    Juha

  • Error when creating a user - IAM-3010183 : An error occurred while checking if a user already exists with the Common Name generated.

    Error when creating a user - IAM-3010183 : An error occurred while checking if a user already exists with the Common Name generated.

    in OIM 11g R2
    Message was edited by: 2b3c0737-074f-48d0-a760-e24e3ed9a37c

Maybe you are looking for

  • Digital Blow in and Multi Orientation Folios

    Hi there, stoked to be using the reading api and digital blow in features discussed here. we're using it in this app, and it appears we've discovered a bug, whereby if you produce a multi-orientation folio, then the web-overlay only works on the port

  • What happened to fill light in Camera Raw 7? I miss it.

    Fill light seems to be missing in Camera Raw 7...how to substitute for it?

  • Uploading data through Table Maintance Generator

    hi Folks,          I have created three Custom tables in Solution Manager. i need to create  multiple entries for the tables. but i am very new to table maintanance generator. could any one tel me the step by step procedure (Like what to give for aut

  • What's happen with this JDBC driver?

    Hi I have just started with JDBC, and I follow the steps from the Mysql drivers, but always receive the same error: java.sql.SQLException: No suitable driver at java.sql.DriverManager.getConnection(DriverManager.java:532) at java.sql.DriverManager.ge

  • How do I set "From" to full address?

    I've been working with the mail program, and it's OK but I'd like to have a modification. When I receive an incoming email, the "from" only lists the persons name, often embedded in a blue lozenge shape. As a busy professional, I need to instantly se