To display a VARCHAR field in database as select boolean checkbox

Hi,
i have a table in database having a VARCHAR2(1) field named IsActive with value 'Y' or 'N' , I need to display this field as select boolean check box in the JSF page
using ADF Entity Object and ViewObject. We have followed the following method for displaying this field as select boolean check box.
1. Changed the datatype of the IsActive field in the Entity Object as Boolean and the database column type as Varchar2(10)
2. we have edited the query using case when IsActive='Y' then 1 else 0 end .
3.and converted the IsActive inputtext to select boolean checkbox.
Thus we where able to display this field as select boolean check box but the problem is that we where not able to insert the data as 'Y' or 'N' using this method.
Please help us whether the method we are following is correct or is there any other method to insert and display the similar fields like IsActive as select boolean check box in ADF
Thanks in Advance
Anitha

Anitha,
Create a transient boolean attribute on your EO. Write the getter to return true/false if the real attribute is Y/N. Write the setter to do the converse. Bind the transient attribute to the checkbox.
John

Similar Messages

  • F4 display upon value request - values to be selected

    Hello experts,
    I have an issue here. When the function module F4IF_INT_TABLE_VALUE_REQUEST is used in my program for displaying the PSTYV field values on the selection screen upon value request. Now, when the popup opens there are 53 number of item categories, i.e., from VBRP table. If any one of them is selected and double clicked, they should be selected as per the conventional idea, but nothing is being selected after double clicking. How to achieve this ?  The following is my code.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR SO_PSTYV-LOW.
    SELECT DISTINCT PSTYV
      FROM VBRP
      INTO TABLE GT_PSTYV.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
        retfield               = 'PSTYV'
       VALUE_ORG              = 'S'
      tables
        value_tab              = GT_PSTYV
       RETURN_TAB             = GT_RETURN
    EXCEPTIONS
       PARAMETER_ERROR        = 1
       NO_VALUES_FOUND        = 2
       OTHERS                 = 3
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Thanks and regards,
    Ambareesh J.

    Try passing parameters dynpprog dynppr and dynprofield as below:
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
         EXPORTING
           retfield        = 'PSTYV'
           value_org       = 'S'
          dynpprog        = sy-cprog
           dynpnr          = sy-dynnr
           dynprofield     = 'SO_PSTYV-LOW'
         TABLES
           value_tab       = gt_pstyv
           return_tab      = gt_return
         EXCEPTIONS
           parameter_error = 1
           no_values_found = 2
           OTHERS          = 3.
       IF sy-subrc <> 0.
         MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
       ENDIF.
    Regards

  • At run time,ALV table is displaying all fields of database table

    Hi all
    I done one application using ALv I am displaying the ALV Table.my problem is at run time it was fetching and displaying all the fields in the data base table but i need only the fields which are defined in node.
    Please help me.
    Thanks and Regards
    Tulasi Palnati

    Hi,
    May be you have specified the database table as the Dicitonary structure property of the node.
    Check the same and if its there clear the Dictionary structure property of the node.
    Hope this solves your isse!
    Regards,
    Srilatha

  • What is the Function MOdule that returns the fields in database table order

    Hello Folks
      I have a dynamic internal table with fields ( which are not in order). I want to display them in the order of which they are present in the database table? Is there any function module that returns the fields in database order?
    FAQ. Please search before posting your question.
    Edited by: Suhas Saha on Oct 10, 2011 10:19 PM

    Hi,
    You can use this BAPI.
    <b>BAPI_SALESORDER_GETLIST</b>
    Reward if useful.
    Regards,
    Vimal

  • How to populate a field from database through personalization

    I need to populate value of a field from database on self service transaction web page. This field is not configured as EIT or SIT, nor available in seeded transaction.I need to know abt creating some item through personalization where i can write a query . This item will execute the query and display the returned value on the page or something on the similar line.
    Thanks in advance,
    Tanveer

    This workaround should be used as a one time approach till you move to 11.5.10 CU3.
    Here are the details,
    You just need to add the following tags inside the site or function level customization document, remember it should be either site or function only no other levels are supported for adding a new item.
    before adding the following tags you need to find out the following details,
    1. what is the last item in the advancedTable, column or columnGroup in the base metadata. Do not conside the columns inside the columnGroups for this, just the last item which might be a column or a columngroup. Get the if of that item.
    2. You should know what is the view instance and viewattribute you will be attaching
    3. Remember you can only add columns through personalization and not columnGroups.
    4. Replace the appropriate values for the properties amrked with {...} with your own values. You can change the other properties to reflect any specific requirement you want. Make sure you provide correct values.
    <insert after="{the id you got from step 1}">
    <oa:column id="{yourid}" adminCustomizable="true" bandingShade="none"
    cellNoWrapFormat="false" columnDataFormat="textFormat" displayGrid="true"
    rendered="true" scope="." totalValue="false" userCustomizable="false"
    xmlns:oa="http://xmlns.oracle.com/oa">
    <ui:columnHeader xmlns:ui="http://xmlns.oracle.com/uix/ui">
    <oa:sortableHeader id="{yourid}" adminCustomizable="true"
    cellNoWrapFormat="false" initSortSeq="none" prompt="{your prompt}"
    rendered="true" required="no" scope="." sortState="no"
    userCustomizable="false"/>
    </ui:columnHeader>
    <ui:contents xmlns:ui="http://xmlns.oracle.com/uix/ui">
    <oa:messageStyledText id="{yourid}" adminCustomizable="true"
    cellNoWrapFormat="false" dataType="VARCHAR2" initSortSeq="none" queryable="false" rendered="true" required="no" scope="."
    selectiveSearchCriteria="false"
    serverUnvalidated="false" sortState="no" tipType="none" totalValue="false"
    userCustomizable="false" vAlign="middle" viewAttr="{your view attribute}" viewName="{your view instance name}"
    warnAboutChanges="true"/>
    </ui:contents>
    </oa:column>
    </insert>
    You can insert these tags at the end of any existing tags within the <modifications>
    </modifications> tag in the document.

  • Clob's versus Varchar fields

    It's been a day of learning. I found out that when Kodo gets a
    columnlength of -1 for a String field, it will ask the Dictionary for
    the sql for generating a Clob. Also when Kodo finds a positive
    columnlength it will call getLenString on the dictionary.
    We're using MySQL and in this case, when the column-length of a String
    is set to -1 this creates a TEXT field and when the column-length is
    positive this creates a VARCHAR(column-length) field.
    When querying the database, Kodo once again turns to the meta data. When
    the column-length has been set to -1 Kodo does a separate query for each
    text field. If the column-length is positive, Kodo includes the field in
    it's default-fetch-group.
    Am I correct so far?
    The problem I have is that when a query for a certain field is
    performed, I want it to be in the first group fetched. It is always
    needed and not that large at all. It will at most be 1500 characters. In
    SQL Server and possibly others, I can put the column-length at 1500 and
    wind up with a varchar field of 1500 characters long. MySQL however,
    does not support anything over 255 characters for a varchar field.
    So, I need to create a field of type TEXT to allow it to contain more
    than 255 chars. However, I do not want a separate query for the field
    since it won't be that big anyway.
    I've been able to get this working using the column-length -1 at schema
    time and the value 1500 at runtime. This is not at all convenient and
    will very likely result in a wrong schema being created or the wrong
    query being run in the long run.
    Is the solution I just mentioned the only one, or are there other scenarios?
    Thanks in advance,
    Martin van Dijken

    Martin-
    Your analysis is exactly right. Kodo 3.0 allows a lot more latitude in
    how this behavior is defined.
    One way in which you might be able to get around this problem is to
    leave the "column-length" attribute to -1, but manually force the
    mapping to not be the ClobMapping (which is the mechanism by which Kodo
    knows to issue a separate query for the object). You can do this by
    setting the "custom-mapping" field-level metadata extension to
    "com.solarmetric.kodo.impl.jdbc.ormapping.ValueMapping".
    I'll be interested to know if this works for you.
    In article <[email protected]>, Martin van Dijken wrote:
    It's been a day of learning. I found out that when Kodo gets a
    columnlength of -1 for a String field, it will ask the Dictionary for
    the sql for generating a Clob. Also when Kodo finds a positive
    columnlength it will call getLenString on the dictionary.
    We're using MySQL and in this case, when the column-length of a String
    is set to -1 this creates a TEXT field and when the column-length is
    positive this creates a VARCHAR(column-length) field.
    When querying the database, Kodo once again turns to the meta data. When
    the column-length has been set to -1 Kodo does a separate query for each
    text field. If the column-length is positive, Kodo includes the field in
    it's default-fetch-group.
    Am I correct so far?
    The problem I have is that when a query for a certain field is
    performed, I want it to be in the first group fetched. It is always
    needed and not that large at all. It will at most be 1500 characters. In
    SQL Server and possibly others, I can put the column-length at 1500 and
    wind up with a varchar field of 1500 characters long. MySQL however,
    does not support anything over 255 characters for a varchar field.
    So, I need to create a field of type TEXT to allow it to contain more
    than 255 chars. However, I do not want a separate query for the field
    since it won't be that big anyway.
    I've been able to get this working using the column-length -1 at schema
    time and the value 1500 at runtime. This is not at all convenient and
    will very likely result in a wrong schema being created or the wrong
    query being run in the long run.
    Is the solution I just mentioned the only one, or are there other scenarios?
    Thanks in advance,
    Martin van Dijken
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • Displaying Single Datablock field in Multiple Record Data Block

    Hi all
    I have a master detail block for cash transaction recording.
    Master Table name CahMaster and datablock contains columns Cash Bill No, Date, Customer ID, Misc Freight Charges.
    Detail Table name is CashDetail and datablock includes product id, product name, unit price, quantity, return, discount and Disc Overall. Number of records to be displayed in this block are 10.
    Now I want to Display Disc Overall field for one time only which is also a database field.
    I have used to set its properties to be displayed for one time only. It apprantlelly solved the problem.
    But when I used to execute query to see the previous records,
    Disc Overall field does not show the records till I move or Mouse click the last record of any cashdetail record.
    Any solution, thanks in advance!!!
    With Best Regards
    Thunder2777

    The layout of my cash detail is as follow to give you better undrstanding
    Prod_ID Prod_Name Qty Unit Price Return Disc Total per Record
    Total Qty --- Total Return ---- Sub Total ----
    Disc Overall ----- Grand Total ----
    I calculate cash Detail as following
    Total per Record = ((Qty - Return) X Unit Price) - Disc (Discount)
    Disc (Discount) is further calculated through When Validate trigger at item level which is (totalPrice * Disc)/100
    Total Per Record is a display field just to display the total.
    There are 4 other Displays fields e.g Total Qty, Total Return, Sub Total and Grand Total
    Totoal Qty, Total Return and Sub Total uses the sum fuction of block to calculate the sum of these three columns. Sub Total sum the Total Per Record field /column.
    Grand total again uses the when validate trigger at item level to calculate the grand total which is Grand Total = Sub Total - Disc Overall.
    Disc Overall = Subtotal - (subtotal * Disc Overall ) / 100
    That' s why I have asked to display the Discont Overall field for ONE TIME only as it is the discount which is applied to overall total.
    With Thanks
    Thunder2777

  • Change XSD / XML dataset during runtime and display texts in field explorer

    Hi there,
    I am changing the datasource of a report during runtime. Afterwards, I would like to change the texts of the fields appearing in the field explorer.
    I tried:
    CrystalDecisions.ReportAppServer.DataDefModel.XMLDataSetClass xmlDS =
    new CrystalDecisions.ReportAppServer.DataDefModel.XMLDataSetClass();
    byte[] xmlContent = reportContent.getXmlContent();
    byte[] xsdContent = reportContent.getXsdContent();
    CrystalDecisions.ReportAppServer.CommonObjectModel.ByteArray xmlData =
    new CrystalDecisions.ReportAppServer.CommonObjectModel.ByteArray();
    CrystalDecisions.ReportAppServer.CommonObjectModel.ByteArray xsdData =
    new CrystalDecisions.ReportAppServer.CommonObjectModel.ByteArray();
    xmlData.ByteArray = xmlContent;
    xmlDS.XMLData = xmlData;
    xsdData.ByteArray = xsdContent;
    xmlDS.XMLSchema = xsdData;
    rasDoc.DatabaseController.SetDataSource(xmlDS, "", "");
    rasDoc.Database.Tables[0].Description = "POMMES";
    for (int i = 0; i < rasDoc.DatabaseController.Database.Tables[0].DataFields.Count; i++)
    rasDoc.Database.Tables[0].DataFields.Name = "TEST";
    MessageBox.Show(rasDoc.Database.Tables[0].DataFields.Name);
    rasDoc.Database.Tables[0].DataFields.HeadingText = "HOORAY";
    rasDoc.Database.Tables[0].DataFields.Description = "NOPE";
    MessageBox.Show(rasDoc.Database.Tables[0].DataFields.Description);
    MessageBox.Show(rasDoc.Database.Tables[0].DataFields.HeadingText);
    When running this, the message boxes include the right strings I set before but when this is done, the filed explorer still shows no changes. What am I doing wrong?
    Also, I would like to change the field texts that are displayed in the field explorer. How can this be done?
    Thanks,
    Pascal

    Also, I do not understand why I am not able to change the display of the fields in the filed explorer.
    This coding does not change a bit, but why??
    //preparation
    string tableName = reportDataSet.Tables[0].TableName;
                  // Get the table definition exactly like the definition of my own dataset.
                  CrystalDecisions.ReportAppServer.DataDefModel.Table table = GetTable(tableName);
                  table.ConnectionInfo = connectionInfo;
                  //delete all existing tables if there are any
                  foreach (CrystalDecisions.ReportAppServer.DataDefModel.Table oldTable in rasDoc.DatabaseController.Database.Tables)
                      rasDoc.DatabaseController.RemoveTable(oldTable.Name);
                  //add my new table with the IDs of the XSD
                  rasDoc.DatabaseController.AddTable(table, null);
                  //now I want to change the displayed fields texts
                  CrystalDecisions.ReportAppServer.DataDefModel.Tables modifyTables =
                      rasDoc.DatabaseController.Database.Tables;
                  CrystalDecisions.ReportAppServer.DataDefModel.Table myTable =
                      (CrystalDecisions.ReportAppServer.DataDefModel.Table)modifyTables[0];
                  Fields fields = myTable.DataFields;
                  for (int i = 0; i < fields.Count; i++)
                      ISCRField field = fields<i>;
                      ResultFieldController resultFieldController =
                         rasDoc.DataDefController.ResultFieldController;
                      try
                          resultFieldController.Remove(field);
                          string sText = "";
                          sText = "Bäschreibung" + i.ToString();
                          field.Description = new string(sText.ToCharArray());
                          sText = "Häding" + i.ToString();
                          field.HeadingText = new string(sText.ToCharArray());
                          //sText = "Näme" + i.ToString();
                          //field.Name = new string(sText.ToCharArray());
                          resultFieldController.Add(-1, field);
                      catch (Exception exp)
                          MessageBox.Show(exp.Message);
    I am completely stuck.
    Thanks for any help.
    Pascal
    Edited by: Pascal Schmidt-Volkmar on Sep 30, 2008 9:31 AM

  • Best practice to define length for varchar field of table in sql server

    What is best practice to define length for a varchar field in table
    where field suppose Remarks By Person  varchar(max) or varchar(4000)
    Could it affect on optimization in future????
    experts Reply Must ... 
    Dilip Patil..

    Hi Dilip,
    Varchar(n/max) is a variable-length, non-unicode character data. N defines the string length and can be a value from 1 through 8,000. Max indicates that the maximum storage size is 2^31-1 bytes (2 GB). The storage size is the actual length of the data entered
    + 2 bytes. We always use varchar when the sizes of the column data entries vary considerably. While if the filed data size might exceed 8,000 bytes in some way, we should use varchar(max).
    So the conclusion is just like Uri said, use varchar(max) or varchar(4000) is depends on how much characters we are going to store.
    The following document about varchar in SQL Server is for your reference:
    http://technet.microsoft.com/en-us/library/ms176089.aspx
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Best Practice to Atomic Read and Write a Field In Database

    I am from Java Desktop Application background. May I know what is the best practice in J2EE, to atomic read and write a field in database. Currently, here is what I did
    // In Servlet.
    synchronized(private_static_final_object)
        int counter = read_counter_from_database();
        counter++;
        write_counter_back_to_database(counter);
    }However, I suspect the above method will work all the time.
    As my observation is that, if I have several web request at the same time, I am executing code within single instance of servlet, using different thread. The above method shall work, as different thread web request, are all referring to same "private_static_final_object"
    However, my guess is "single instance of servlet" is not guarantee. As after some time span, the previous instance of servlet may destroy, with another new instance of servlet being created.
    I also came across [http://code.google.com/appengine/docs/java/datastore/transactions.html|http://code.google.com/appengine/docs/java/datastore/transactions.html] in JDO. I am not sure whether they are going to solve the problem.
    // In Servlet.
    Transaction tx = pm.currentTransaction();
    tx.begin();
        int counter = read_counter_from_database();  // Line 1
        counter++;                                                  // Line 2
        write_counter_back_to_database(counter);    // Line 3
    tx.commit();Is the code guarantee only when Thread A finish execute Line 1 till Line 3 atomically, only Thread B can continue to execute Line 1 till Line 3 atomically?
    As I do not wish the following situation happen.
    (1) Thread A read counter from Database as 0
    (2) Thread A increment counter to 1
    (3) Thread B read counter from Database as 0
    (4) Thread A write counter as 1 to database
    (5) Thread B increment counter to 1
    (6) Thread B write counter as 1 to database
    What I wish is
    (1) Thread A read counter from Database as 0
    (2) Thread A increment counter to 1
    (4) Thread A write counter as 1 to database
    (3) Thread B read counter from Database as 1
    (5) Thread B increment counter to 2
    (6) Thread B write counter as 2 to database
    Thanks you.
    Edited by: yccheok on Oct 27, 2009 8:39 PM

    This is my understanding of the issue (you should research it further on you own to get a better understanding):
    I suggest you use local variables (ie, defined within a function), and keep away from static variables. Those local variables are thread safe. If you call functions within functions, its still thread safe. If you read or write to one record in a database using sql, its thread safe (you dont need a transaction). If you read/write to multiple tables and/or records, you probably need a transaction. Servlets are thread safe. You usually dont need the 'synchronized' word anywhere unless you have a function updating/reading a static variable and therefore want to ensure only one user is accessing the static varible at a time. Also do so if you are writing to some resource (such as a file, a variable in applicaton scope, session scope, or resource that everyone uses such as email server). You dont want more than one person at a time to write to it). Note the database is one of of those resources that is handled by transactions rather than the the synchronized keyword (the synchronized keyword is applied to your application only (not other applications that someone is running), whereas the transaction ensures all applications are locked out while you update those records in the database).
    By the way, if you have a static variable, you should have one and only one function (synchronized) that updates it that everyone uses. If you have more than one synchronized function, that updates it, its probably not thread safe.
    An example of a static variable you would use is a Datasource object (to obtain your database connections). You only need one connection pool in your application and you access it via the datasource variable.
    If you're unsure your code is thread safe, you can create two seperate threads that call the same block of functions repeatedly to ensure it works as expected.

  • Missing class indicator field from database row

    Hi,
    I have following problem :
    There is a class inheritance with root interface and 4 subclasses, they are initialized with class indicator field. If I use ReadAllQuery with an interface or some of concrete class as search class - it is working perfect, but if I try to build query with custom selected fields (addPartialAttribute) I always get an error - Missing class indicator field from database row.
    AFAIK This field have not to be mapped in Workbench to real table column, how can I tell TopLink that I will read this indicator field too by reading some custom fields ? I thought TopLink reads such fields automatically, like it does it with primary keys.
    Thank you
    Maksim

    This sounds like an issue with our partial attribute queries and inheritance as the type indicator column must always be read. Can you map the type indicator to a read-only attribute (mark mapping as read-only) and include this in your list of attributes as a work-around?
    Doug

  • Module pool programming - supressing display of some fields

    Moderator message: better to start a new thread.
    Hi i have similar requirement to this. module pool programming - supressing display of some fields
    suppose i am displying
    BUKRS    0001
    Sales org  0001
    KUNNR    1000
    i dont want todisplay  if the field is blank.
    suppose if sales org is blank
    expected result is liek this
    BUKRS    0001
    KUNNR    1000
    i tried through loop at screen by uisng that
    i am getting output like below.
    BUKRS    0001
    KUNNR    1000
    hello subbarao, could you tell if your problem solved.

    Hi Naidu,
    In PBO put
    DATA: FLAG TYPE I VALUE 0.
    IF SALESORG = SPACE.
      FLAG = 1.
    ENDIF.
    LOOP AT SCREEN.
      IF FLAG = 1.
        IF SCREEN-NAME  = 'SALESORG'.
           SCREEN-INVISIBLE = 'X'.
           MODIFY SCREEN.
        ENDIF.
    ENDIF.
    ENDLOOP.
    Thanks,
    Chidanand

  • How to add a value table to a field in database table?

    Dear Experts,
    Normally a value table can be added in the domain.
    And the field of the database table will have the value table, to which this domain is assigned.
    My question is.. Is it possible to assign a value table to any field ina database table, directly?(i.e. <b>without assigning to that domain</b>)
    If yes.. please let me know the <b>step-by-step</b> procedure clearly.
    Thanks to U in advance.

    Hi sr,
    1. what is the purpose of your value table ?
      -- so that the user can select values
       from some master table , for that field !!!!
    2. This is done by
        CHECK TABLE (foreign key concept)
       (and not value table)
    3. When we create a check table for a field,
       then
       some DEFAULT table is PROPOSED
       . that DEFAULT table is nothing
      but PICKED up from the domain of that field,
      and shown from the value of VALUE TABLE.
      (we can change it however)
    4. so for your purpose,
       just create a CHECK TABLE.
    regards,
    amit m.

  • How to set "Display as Text" field with AJAX select list

    thanks Denes for your posting. I'm trying to use the Denes Kubicek code to populate a "Display as Text" field. It works for Text Field (disabled), but not "Display as Text" field(saves state) . In my applciation I need to show this field only (not the disabled text box) when a select list value is changed. any ideas to modify the code below are appreciated.
    http://htmldb.oracle.com/pls/otn/f?p=31517:80:3418128396960418::NO
    here is the code from the url above
    1. Create an Application Process - getDet:
    DECLARE
    my_det VARCHAR2 (200);
    BEGIN
    SELECT ename || CHR(10) || job || CHR(10) || mgr
    INTO my_det
    FROM emp
    WHERE empno = :P80_EMPLOYEES;
    HTP.prn (my_det);
    END;
    2. Put the following in the Region Header of your page:
    <script language="JavaScript" type="text/javascript">
    function f_getDet ()
    var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=getDet',0);
    get.add('P80_EMPLOYEES',html_GetElement('P80_EMPLOYEES').value)
    gReturn = get.get();
    if(gReturn)
    {  html_GetElement('P80_DETAILS').value = gReturn  }
    else
    {  html_GetElement('P80_DETAILS').value = 'null'  }
    get = null;
    </script>
    3. Put the following in the HTML Form Element Attributes of :P80_EMPLOYEES:
    onChange="f_getDet()";

    Arie,
    this works fine on normal page, except page zero. I have the AJAX select list and "Display as Text" field on page zero. The "Display as Text" field doesn't show the the value when AJAX select is changed. I'm using similar code as used in my other APEX page on OTN site. I tired to display the gReturn value, just before calling "setDisplayOnlyNode" function in the code below and it's showing correct value, but fails to display the value in the APEX field on page zero. Any ideas are appreciated.
    Thanks,
    Surya
    <script language="JavaScript" type="text/javascript">
    function setDisplayOnlyNode(pItem, pValue)
    { var textNode = pItem + '_DISPLAY'; $x(textNode).innerText = pValue; }
    function f_getDet ()
    var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=getDet',0);
    get.add('P1_EMPLOYEES',html_GetElement('P1_EMPLOYEES').value)
    gReturn = get.get();
    if(gReturn)
    { setDisplayOnlyNode('P1_DETAILS',gReturn)}
    {  html_GetElement('P1_TEST').value = gReturn  }
    get = null;
    </script>

  • Comparing 2 varchar fields

    I have a procedure which accepts a varchar field as input and compares it with each value in a table. how do I code it.
    e.g. proc1(xx IN varchar, yy OUT)
    --say column name is abc then
    where abc = xx;
    Dosent giving any output.

    here it goes
    SQL> ED
    Wrote file afiedt.buf
    1 CREATE OR REPLACE PROCEDURE
    2 COMPARE_VARCHAR_FIELDS(XX IN VARCHAR,YY OUT VARCHAR)
    3 IS
    4 A NUMBER:=0;
    5 BEGIN
    6 FOR I IN (SELECT * FROM AX WHERE X=XX)
    7 LOOP
    8 A:=A+1;
    9 END LOOP;
    10 IF A>0 THEN
    11 YY:=XX||' FOUND '||A||' TIMES';
    12 ELSE
    13 YY:=XX||' NOT FOUND';
    14 END IF;
    15* END;
    SQL> /
    PL/SQL procedure successfully completed.
    SQL> ed
    Wrote file afiedt.buf
    1 DECLARE
    2 Z VARCHAR2(40);
    3 BEGIN
    4 COMPARE_VARCHAR_FIELDS('x',z);
    5 dbms_output.put_line(z);
    6* end ;
    SQL> /
    PL/SQL procedure successfully completed.
    SQL> set serveroutput on
    SQL> /
    x FOUND 3 TIMES
    PL/SQL procedure successfully completed.

Maybe you are looking for

  • EFI Update 2.9 other issue

    After EFI update 2.9 Wifi no longer automatically connects to remembered networks on wake. I was having the highly delayed wake issue on occasion that this update was said to fix. Now even time I open the lid (100% of the time so far) i must manually

  • Global Shelf Life Tags In ADMN What is this?

    There is a submenu called "Shelf Life Tags" in ADMN that is not visible in the left side or top Portal menus, but is visible from inside ADMN on the Action Menu ... Action Menu, Manage, Global, Shelf Life Tags. Nothing happens when this is selected a

  • Truncates the leading zeros even though the member is text type

    We have members with data type "TEXT" in planning database. When user enters something with leading zero, it saves the same in relational but not showing the same in planning. It truncates the zero even though it is a text member. Planning version 11

  • Which windows / vista do I need

    I just bought a new macbook pro. I want to use bootcamp to mostly play PC games. Which is the best windows operating system to buy? How much space would you recommend using on the hard drive? 50GB? I also get some powerpoint documents that I will nee

  • An iBook for £20 - what do you think?

    I know this is not really destined to be put on this discussion forum, but the thought of a bargain got the better of me. I registered and risked just £20 at: http://www.cheapibook.co.uk/ Has anyone on this forum ever had any success with this websit