Items and SQL Types

I've just started learning apex and I'm confused about page/application items. Since they can be used in SQL and PL/SQL as some kind of variables (for example using bind variable syntax), at some point they should be prescribed a type, since SQL and PL/SQL are both strongly typed languages.
It seems that items do have types, see the documentation (http://docs.oracle.com/cd/E11882_01/appdev.112/e11947/bldapp.htm#BCEDCGGH), but I'm not sure how they correspond to SQL types.
For example I saw that to_date is always used with items of date picker type, implying it is some string SQL type.
So the question. What SQL type do apex page/application items have, that is what type conversion do I need to use when dealing with items inside SQL and PL/SQL?

They are all VARCHAR2(4000) as far as I know - all application item are the same and the page items can be set to number or date in addition. Setting it to number or date will only include an internal validation checking if the format is matching the application globalization settings.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.apress.com/9781430235125
http://apex.oracle.com/pls/apex/f?p=31517:1
http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
-------------------------------------------------------------------

Similar Messages

  • Debit/Credit sign settings of item and movement type usage

    Dear BCS Experts,
    According to your experience, where are Debit/Credit sign settings of item and movement type used in BCS? As I know, they can be used during data collection. Any other thoughts?
    Thanks.

    Actually, Barry, I recognised that that was not a doubt regarding BCF. It was (and still is) a doubt about the MoveType sign for that values that are generated automatically during the CoI activities.
    Since the decrease/increase for such activies is defined, there is a question if the sign of these MoveTypes may interfere with the amounts or the side to be placed in (debit or credit).
    Do you have experience in this?

  • Records and Objects, Cast for PL/SQL Type RECORD and SQL Type OBJECT

    Hi seniors:
    In my job, we have Oracle 10g, programming with Packages, the parameters are PL/SQL Types,
    Example:
    PACKAGE BODY NP_CONTROL_EQUIPMENT_PKG
    IS
    TYPE TR_EQUIPMENT_OPERATION IS RECORD(
    wn_npequipmentoperid CONTROL_EQUIPMENT.NP_EQUIPMENT_OPERATIONS.npequipmentoperid%TYPE,
    wv_npactiveservicenumber CONTROL_EQUIPMENT.NP_EQUIPMENT_OPERATIONS.npactiveservicenumber%TYPE,
    wv_npspecification ORDERS.NP_SPECIFICATION.npspecification%TYPE,
    wv_nptype ORDERS.NP_SPECIFICATION.nptype%TYPE,
    wn_nporderid CONTROL_EQUIPMENT.NP_EQUIPMENT_OPERATIONS.nporderid%TYPE,
    wn_npguidenumber CONTROL_EQUIPMENT.NP_EQUIPMENT_OPERATIONS.npguidenumber%TYPE,
    wd_npdevolutionprogramdate CONTROL_EQUIPMENT.NP_EQUIPMENT_STATUS.npdevolutionprogramdate%TYPE
    TYPE TT_TR_EQUIPMENT_OPERATION_LST IS TABLE OF TR_EQUIPMENT_OPERATION INDEX BY BINARY_INTEGER;
    PROCEDURE SP_GET_EQUIPMENT_OPERATION_LST(
    an_npequipstatid IN CONTROL_EQUIPMENT.NP_EQUIPMENT_STATUS.npequipstatid%TYPE,
    at_equipment_operation_list OUT TT_TR_EQUIPMENT_OPERATION_LST,
    av_message OUT VARCHAR2
    IS
    BEGIN
    SELECT EO.npequipmentoperid,
    EO.npactiveservicenumber,
    S.npspecification,
    S.nptype,
    EO.nporderid,
    EO.npguidenumber,
    ES.npdevolutionprogramdate
    BULK COLLECT INTO at_equipment_operation_list
    FROM NP_EQUIPMENT_OPERATIONS EO,
    NP_EQUIPMENT_STATUS ES,
    ORDERS.NP_ORDER O,
    ORDERS.NP_SPECIFICATION S
    WHERE EO.npequipstatid = ES.npequipstatid
    AND EO.nporderid = O.nporderid
    AND O.npspecificationid = S.npspecificationid
    AND EO.npequipstatid = an_npequipstatid;
    EXCEPTION
    WHEN OTHERS THEN
    av_message := 'NP_CONTROL_EQUIPMENT_PKG.SP_GET_EQUIPMENT_OPERATION_LST: '||SQLERRM;
    END SP_GET_EQUIPMENT_OPERATION_LST;
    END;
    Procedures calls other procedures and passing parameters IN OUT defined that PL/SQL Types. The problem appears when the access is through Java. Java can't read PL/SQL Types because only read SQL Types (Types defined in SCHEMA):
    CREATE OR REPLACE
    TYPE TO_EQUIPMENT_OPERATION AS OBJECT (
    wn_npequipmentoperid NUMBER,
    wv_npactiveservicenumber VARCHAR2(15),
    wv_npspecification VARCHAR2(8),
    wv_nptype VARCHAR2(2),
    wn_nporderid NUMBER,
    wn_npguidenumber NUMBER,
    wd_npdevolutionprogramdate DATE
    CREATE OR REPLACE
    TYPE TT_EQUIPMENT_OPERATION_LST
    AS TABLE OF "CONTROL_EQUIPMENT"."TO_EQUIPMENT_OPERATION"
    Java can read this SQL Types. The problem is how cast OBJECT to RECORD, because I can't execute that:
    DECLARE
    wt_operation_lst TT_EQUIPMENT_OPERATION_LST;
    BEGIN
    SELECT EO.npequipmentoperid,
    EO.npactiveservicenumber,
    S.npspecification,
    S.nptype,
    EO.nporderid,
    EO.npguidenumber,
    ES.npdevolutionprogramdate
    BULK COLLECT INTO wt_operation_lst
    FROM NP_EQUIPMENT_OPERATIONS EO,
    NP_EQUIPMENT_STATUS ES,
    ORDERS.NP_ORDER O,
    ORDERS.NP_SPECIFICATION S
    WHERE EO.npequipstatid = ES.npequipstatid
    AND EO.nporderid = O.nporderid
    AND O.npspecificationid = S.npspecificationid
    AND EO.npequipstatid = an_npequipstatid;
    END;
    and throws NOT ENOUGH VALUES, and I modified to:
    DECLARE
    wt_operation_lst TT_EQUIPMENT_OPERATION_LST;
    BEGIN
    SELECT TO_EQUIPMENT_OPERATION(EO.npequipmentoperid,
    EO.npactiveservicenumber,
    S.npspecification,
    S.nptype,
    EO.nporderid,
    EO.npguidenumber,
    ES.npdevolutionprogramdate)
    BULK COLLECT INTO wt_operation_lst
    FROM NP_EQUIPMENT_OPERATIONS EO,
    NP_EQUIPMENT_STATUS ES,
    ORDERS.NP_ORDER O,
    ORDERS.NP_SPECIFICATION S
    WHERE EO.npequipstatid = ES.npequipstatid
    AND EO.nporderid = O.nporderid
    AND O.npspecificationid = S.npspecificationid
    AND EO.npequipstatid = an_npequipstatid;
    END;
    Worst is that I can't modify this procedure and PL/SQL Types will survive.
    I have create a copy that CAST RECORD to OBJECT and OBJECT to RECORD too.
    PROCEDURE SP_COPY_PLSQL_TO_SQL(
    an_npequipstatid IN NUMBER,
    at_dominio_lst OUT ORDERS.TT_EQUIPMENT_OPERATION_LST, --SQL Type
    av_message OUT VARCHAR2
    IS
    wt_dominio_lst CONTROL_EQUIPMENT.NP_CONTROL_EQUIPMENT_PKG.TT_TR_EQUIPMENT_OPERATION_LST; --PL/SQL Type
    BEGIN
    SP_GET_EQUIPMENT_OPERATION_LST(an_npequipstatid, wt_dominio_lst, av_message);
    IF av_message IS NULL THEN
    at_dominio_lst := ORDERS.TT_EQUIPMENT_OPERATION_LST(ORDERS.TO_EQUIPMENT_OPERATION('','','','','','',''));
    at_dominio_lst.EXTEND(wt_dominio_lst.COUNT - 1);
    FOR i IN 1..wt_dominio_lst.COUNT LOOP
    at_dominio_lst(i) := ORDERS.TO_EQUIPMENT_OPERATION(wt_dominio_lst(i).wn_npequipmentoperid,
    wt_dominio_lst(i).wv_npactiveservicenumber,
    wt_dominio_lst(i).wv_npspecification,
    wt_dominio_lst(i).wv_nptype,
    wt_dominio_lst(i).wn_nporderid,
    wt_dominio_lst(i).wn_npguidenumber,
    wt_dominio_lst(i).wd_npdevolutionprogramdate
    END LOOP;
    END IF;
    END;
    I would like that the CAST is direct. Somebody can help me?. Thank you so much!

    I am facing the same problem as u had...may I know how u solved ur probkem...
    thanks,
    kishore

  • Mapping JDBC and SQL types

    Hi, I've got the following problem - I write program that communicates with PostgreSQL-Server. Everything is ok, but the database has been designed not in the best way and there's no way to change it now. Furthermore they have stored procedures that contain specific data types. And I've got the problems with these stored procedures. Look the procedure has a header:
    send2db(macaddr, int8, float4, timestamp)
    The problem is that I haven't found any compatible JDBC-type for macaddr. And it's not the worst - I don't know how to send arrays. I know that server accepts all these types simply like Strings in the form (for example for _timestamp):
    '{"2005-4-15 15:3:4","2005-4-15 15:3:8","2005-4-15 15:3:28"}'
    But if I send these Stings, I get the error from the server.
    For Java I have the following code:
      CallableStatement cstmn = db.prepareCall("{?=call send2db(?,?,?,?)}");
          cstmn.registerOutParameter(1, Types.INTEGER);
          cstmn.setString(2,macaddr);
          cstmn.setInt(3,verytemp);
          cstmn.setString(4,tvalues_array);
          cstmn.setString(5,date_array);
          cstmn.execute();
          result = cstmn.getInt(1);

    Since java extracts away the platform dependence it is less important what platform you work on.
    In theory an application (web or not) should work with out modification on a solaris machine a windows pc or even a mac. That is not to say that you would want to run your web server off a mac g4 though. Use the best machine for the job. It is not the machine but all the software that goes with it that matters more.
    The database is also much less of a problem because you interact with it through JDBC rather then directly. Hence, in theory (again), you should be able to switch the database and not change any code. This means the choice of SQLServer over Oracle over MySQL is less of an issue again. Databases are not as well extracted as the machine and often you have to change code to switch database but if you understand this from the start even that will mean only minor changes.

  • Matching data types b/w oracle and sql server

    anyone here knows if there is a list of data types supported by both oracle and sql server (regardless of releases & versions?
    an immediate response would be highly appreciated.
    thanks.

    Hi,
    The following post might be of assistance to you:
    http://msdn.microsoft.com/en-us/library/ms151817.aspx
    If this is what you're looking for, then mark the question as answered and closed.
    Regards,
    Naveed.

  • How to identify listeners types for forms, items and events in addon wizard

    Dear users,
    I have developed a sample addon through B1DE wizards and successfully installed and connected the addon and can view menu and form of my addon. Since i am new to this, i didn't add any listeners to my form, items and events because i don't know what type of listeners to add and what coding to add after adding listeners.
    If anyone describe me how to work with listeners, i would be glad. My form has basic fields like BPcode, BPname, Docnum, Itemcode, Item name, quanity, price, total etc. Uptil now my addon form has no function of getting list of BP and Items and calculating the totals based on price and quantity but it has some basic functions like add, update,del, add print view, next record previous, record next etc. which are due to object registration and auto-code generation wizards i think.
    Please help me in adding listeners and their relevant coding.
    Thanks in advance.

    Thanks for reply, Actually I am asking about listeners in the wizard of B1DE, code generator wizard. I think you are telling me about adding listeners directly in the vb.net. Kindly, tell me first, what event type I should add for item, form etc while adding listeners during  the wizard. Or If you know some link where event types of listeners are decribed, you are more than welcome.
    Thanks,
    Farhan

  • Table to link FI document number, line item and pricing condition type

    Hi,
      I am looking for tables to link the FI document number, line item and PO pricing condition type.
      Appreciate any help on this.
    Thanks.

    For any PO in ME23n in which Goods receipt has happened, you can check in the itemdetails->Po history tab in ME23n.
    Here you will find the material document number. Just click on the material document, it will take you to anpther screen here you will find a button for FI document.
    Click that button for FI document. In PO history istelf you can see the Condition types.
    Hope this helps.

  • Item category (Customized )ZJT1 and MRP type for material is not allowed

    Hi Guys,
                   When i try to create the order i see the error as item category and MRP type of the material is not allowed.
    I checked in Vov5 table, i could observe that Schedule line category is maintained.
    Could you please help us in resolving this..
    Thanks and regards,
    Rahul

    Hi,
    Please assign the Item Category ZJTI and MRP type (for eg: PD) assigned to the schedule line category in IMG under Sales and Distribution--> Sales ---> Schedule line -->Assign schedule line
    Hope this resolve your issue
    Regards,
    KrishnaO

  • Item Category and MRP type for material is not allowed

    Hello all,
    I got a Error Message:
    <b>Transaction Z113 is not defined (Message no. V1347)</b>
    <b>Diagnosis</b>
    This combination of item category Z113 and MRP type for material is not allowed.
    <b>System response</b>
    The system does not allow further processing of this item.
    <b>Procedure</b>
    Check your entry.
    You can display the combination defined in table TVEPZ, which controls scheduling line category determination, and change it as required if you have the authorization to do so. The MRP type for the material may be changed in the material master.
    <b>The SD Configuration seems all right, I have:</b>
    Sls Doc Type (<b>VOV8</b>) – ZA9 (no delivery type assigned)
    Item Category (<b>VOV7</b>) – Z113
    Assigs Sls Doc & Item Ctgry (<b>VOV4</b>) – ZA9/ZNOR/blank/blanl/Z113
    ZNOR = Std Item-Av. chck  Del
    ZNOR defined in MM03/Sls Org 2
    Define Schedule Line (<b>VOV6</b>) = Z7 (without delivery)
    Z7 has FLAG on Prod Allocation
    Assign Schedule Line (<b>VOV5</b>) = Z113/ND/Z7
    At table: TVEPZ
    I have the entry: Z113/ND/Z7
    Guys, what would?
    Please help me out because I am stuck in this issue.
    Thanks a lot,
    Barbara

    Barbara, this may be tied to Strategy Group on the Material Master (I can't read enough into the detail)
    Item Category determination + MRP Type for your schedule line type ties to a Sched. Line category(this you know)
    New Rqmts class gets tied to a Rqmts Type
    New Rqmts Type gets assigned to rqmts class
    Strategy, assign the Rqmts Type to it
    Strategy Group, Assign the Strategy  to it
    MM02 [MRP3 view] strategy group should be the one that ties together (all the other ties
    It may be something in this area that you need to trace through ?
    Bill

  • Java.sql.types and oracletypes

    There appear to be difference in the way the constants are mapped in java.sql.types vs oracletypes(). For example date is '91' in oracletypes and '93' in java.sql.types. The DatabaseMetaData.getColumns() function reports data_type as a java.sql.type. Is there any mapping available from one to the other.
    Thanks

    Erm,
    One way to find out, I reckon.
    Good Luck,
    Avi.

  • T-SQL and CLR types for return value do not match

    Hi I am trying to create a CLR function to call a webservice, the CLR function return data type is double, whether I try
    to create this as a table valued funcion or a scalar to return a distance travelled value I am receiving the error below. I've tried changing data types around in the CLR side and the SQL side but keep receiving the same error message, any help would be appreciated,
    Thank you,
    [Microsoft.SqlServer.Server.SqlFunction(Name = "DistanceCalc")]
    public static Double DistanceCalc(Double SrcLat, Double SrcLong,
    Double DestLat, Double DestLong)
    MileageWS ws = new MileageWS();
    ws.Url = "http://test.isp.ca/Distance.asmx";
    int intUom = 0; // 0 = Mile, 1 = KM
    RouteType RouteMethod = RouteType.Practical;
    Requester RequestedFrom = Requester.LinkRoute;
    Double distance;
    distance = ws.GetDistanceInfoForLonLat(SrcLat, SrcLong, DestLat, DestLong, intUom, RouteMethod, RequestedFrom);
    return distance;
    CREATE FUNCTION DistanceCalc
    @SrcLat as float, @SrcLong as float,
    @DestLat as float, @DestLong as float
    RETURNS TABLE (Distance float)
    External NAME CLRfunctions.RIFunctions.DistanceCalc
    GO
    Error received when try to Create function ...
    1, Level 16, State 2, Procedure pcMiler, Line 6
    CREATE FUNCTION for "pcMiler" failed because T-SQL and CLR types for return value do not match.

    You defined at table-valued CLR function, but I think you meant to define a scalar CLR function. That might be the cause of the error.
    RETURNS TABLE (Distance float)
    should be
    RETURNS (Distance float)

  • BI - Purchase document's item level contion type and correspondingvalue.

    Dear Experts
    I would  like to know - Is there any standard data source in BI for item level condition type and values of Purchase order document. These are available in SAP R/3 . Shall be grateful, if you could kindly help me out
    Kind regards - P.L.Dey

    Hi,
    Actually, These informations are stored in Characteristics and Key Figures i.e., CVCs(characteristic value combinations)
    When you do Purchase Order,
    These Values will store in PURCHIS ( Purchasing Information Systems) and that to, in Open Information Warehouse Data base in the form of CVCs. (In Particular Table forms)
    EG.,
    Values are stored in Key Figures (Eg., Number....)
    Names are stored in Characteristics ( Eg., Purchase order..)
    in CVC, we can easily see, Number of purchase orders for vendor, or so.....
    Hopes it is useful
    Thanks.

  • Inconsistent java and sql object types

    Hi,
    I have run into error "Inconsistent java and sql object types"
    while mapping a java class to a sql object type. The java class
    is just a duplicate of sql data structure and I pretty much
    follow the JDBC Developer's GUide's examples (20-43 to 20-45)
    to create the mapping java class.
    Any one runs into simliar problem or any clues?
    Thanks,
    Ed
    Exception in thread "main" java.sql.SQLException: Inconsistent java and sql object types: InstantiationException:
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
    at oracle.sql.STRUCT.toClass(STRUCT.java:433)
    at oracle.sql.STRUCT.toJdbc(STRUCT.java:366)
    at oracle.jdbc.oracore.OracleTypeUPT.unpickle80rec
    (OracleTypeUPT.java:236)
    at
    oracle.jdbc.oracore.OracleTypeCOLLECTION.unpickle80rec_elems
    (OracleTypeCOLLECTION.java:553)
    at oracle.jdbc.oracore.OracleTypeCOLLECTION.unpickle80rec
    (OracleTypeCOLLECTION.java:383)
    at oracle.jdbc.oracore.OracleTypeCOLLECTION.unpickle80
    (OracleTypeCOLLECTION.java:329)
    at oracle.jdbc.oracore.OracleTypeCOLLECTION.unlinearize
    (OracleTypeCOLLECTION.java:218)
    at oracle.sql.ArrayDescriptor.toJavaArray
    (ArrayDescriptor.java:501)
    at oracle.sql.ARRAY.getArray(ARRAY.java:197)

    The safest way would be to use JPublisher to generate the type classes. In your application, you can just use the generated code to manipulate the object.

  • Item  Type and Service Type in Sales Order

    Hi All,
    How do i enter Item Type and Service Type in single sales order..?
    Any suggestion please...

    Hi
    If you select the Item type you have choose the list of Items else  it is service type you can give service description and choose belongs to G/L Acc.
    Or You can create a service as a Item with Item group as Service.
    Hope it helps you.
    By
    Kalai

  • The java and sql object type  was not matched

    My table(Oracle10.2) has a varying arrays column. For mapping to java classes, I use JDeveloper(10.1.3.1.0) to generate java classes. Then I try to insert a record into this varrying arrays column with java. While it always complaints java.sql.SQLException.the java and sql object type was not matched. I can not find the reason.
    My java code:
                   StructDescriptor structdesc = StructDescriptor.createDescriptor(
                             "VARRAY_SEQ", con);
                   int nid=20;
                   int pid=546;
                   BigDecimal mynid=new BigDecimal(nid);
                   mynid=mynid.setScale(0, BigDecimal.ROUND_HALF_UP);
                   BigDecimal mypid=new BigDecimal(pid);
                   mypid=mypid.setScale(0, BigDecimal.ROUND_HALF_UP);
                   Object[] attributes = { "ASDF", mynid, "Developer", mypid,
                             "rwretw" };
                   STRUCT Rel = new STRUCT(structdesc, con, attributes);
                   stmt.setObject(8, Rel);
                   stmt.execute();
                   stmt.close();
    And the STRUCT is
    public RelSeq(String nucl, java.math.BigDecimal neId, String nuor, java.math.BigDecimal pId, String phor) throws SQLException
    { _init_struct(true);
    setNucl(nucl);
    setNeId(neId);
    setNuor(nuor);
    setPId(pId);
    setPhor(phor);
    }

    My table(Oracle10.2) has a varying arrays column. For mapping to java classes, I use JDeveloper(10.1.3.1.0) to generate java classes. Then I try to insert a record into this varrying arrays column with java. While it always complaints java.sql.SQLException.the java and sql object type was not matched. I can not find the reason.
    My java code:
                   StructDescriptor structdesc = StructDescriptor.createDescriptor(
                             "VARRAY_SEQ", con);
                   int nid=20;
                   int pid=546;
                   BigDecimal mynid=new BigDecimal(nid);
                   mynid=mynid.setScale(0, BigDecimal.ROUND_HALF_UP);
                   BigDecimal mypid=new BigDecimal(pid);
                   mypid=mypid.setScale(0, BigDecimal.ROUND_HALF_UP);
                   Object[] attributes = { "ASDF", mynid, "Developer", mypid,
                             "rwretw" };
                   STRUCT Rel = new STRUCT(structdesc, con, attributes);
                   stmt.setObject(8, Rel);
                   stmt.execute();
                   stmt.close();
    And the STRUCT is
    public RelSeq(String nucl, java.math.BigDecimal neId, String nuor, java.math.BigDecimal pId, String phor) throws SQLException
    { _init_struct(true);
    setNucl(nucl);
    setNeId(neId);
    setNuor(nuor);
    setPId(pId);
    setPhor(phor);
    }

Maybe you are looking for

  • Problem with .css for Spry menu

    Hi, I am having a problem with the Spry menu I have created and edited. All looks great in the Design view of Photoshop however under the Live view or opened using a browser the menu reverts to a list of hyperlinks! I have checked the .css link but w

  • Which oracle 9i or 10 version for Windows Vista Home Premium

    hai, i faced difficulty while installing oracle 9i "jrew.exe" file was not able to execute was the error message and then tried to open sql plus but got an error "SP2-0750 - set variable ORACLE_HOME to your oracle software dir. i am not able to open

  • Approval for each phase in task

    Hi Everyone I am using task list to create Projects. I have field named - "Phases" with values of Planning, Monitoring, Executing, Closing. I want to have approval for each phase from approver. Need suggestions on how do I show each approval for each

  • Agentry First letter uppercase rule

    Hi, is there a (not too complex) way to convert an uppercase string to a string where only the first characters of the words are upper case? The field contains multiple words and every word should begin with a capital. There are only string rules for

  • Using  Java DB (integrated with GlassFish) with Web Space Server

    Hello everybody, Just a question: Instead MySQL can I use the Java DB (derby) already integrated with GF as data store? Happy if to get an answer soon. Thanks, aski