Language for returned data

Hi all;
kindly I need to change the language for returned data where as I have oracle 10g on AIX server because I have a problem when I get arabic data it returns as "??????????"
so please help me.

here is the result of the first query:
VALUE
NLS_CHARACTERSET
AR8ISO8859P6
NLS_NCHAR_CHARACTERSET
AL16UTF16
- the data stored in VARCHAR2(60) column
- nls_lang on AIX server not set ( I used echo $NLS_LANG)
- I'm using toad on windows client (when I press F5 to execut the query it returns rubbish data, but when I press F9 it returns right format which is arabic)
- the result of second query is :
NCLI NDOS ND NARTHCONS
DUMP(C.NOM,1019)
DATDEB_L
1007611 22 065854624 2
Typ=1 Len=30 CharacterSet=AR8ISO8859P6: cc,e5,d9,ea,c9, ,c7,e4,ce,cf,e5,c7,ca, ,
c7,e4,c7,e5,d1,ea,e3,ea,c9, ,c7,e4,ca,d9,e4,ea
31-07-05
1007611 24 065885020 2
NCLI NDOS ND NARTHCONS
DUMP(C.NOM,1019)
DATDEB_L
Typ=1 Len=30 CharacterSet=AR8ISO8859P6: cc,e5,d9,ea,c9, ,c7,e4,ce,cf,e5,c7,ca, ,
c7,e4,c7,e5,d1,ea,e3,ea,c9, ,c7,e4,ca,d9,e4,ea
03-04-05
Edited by: user13364155 on Sep 12, 2011 8:37 AM

Similar Messages

  • Best practise for returning data from EJB's

    I have an EJB that runs a query on a backend database and i want to return the data back to my Java GUI. Ideally i would like to pass a ResultSet back but i don't think they are serialisable so this isn't an option.
    What's considered the best way to pass database results back from EJB's to a front end Java application ?
    Thanks for any ideas you guys have

    If you want type-safety, define a VO (value object) that maps to your result-set, extract the data from the result set into the VO, and return an array of the data. Yes, it's extra work on the "back-end," but that's what the back-end is for. Just make sure your client.jar has the VO in it, as well as the Home and Remote interfaces.

  • How to apply language for a date field

    Hi All,
    I need to print the value of <?CF_DATE_1?> in Spanish (Sábado, 20 de agosto de 2011). Now I get the value "SATURDAY ,20 of AUGUST of 2011"
    Please let me know how can do this.
    Thanks

    See if this link helps - http://blogs.oracle.com/xmlpublisher/entry/share_and_deliver_bi_publisher
    HTH
    Srini

  • Query returns data from previous month. Need to have it return data for the entire year

    This is the part of the query that returns data by month:
    (YEAR(`rereport`.`market_reports_5`.start_date) = YEAR(CURRENT_DATE - INTERVAL 1 MONTH)AND MONTH(`rereport`.`market_reports_5`.start_date) = MONTH(CURRENT_DATE - INTERVAL 1 MONTH))
    How can I get it to return data for the year.
    TIY

    How about omitting the MONTH part:
    (YEAR(`rereport`.`market_reports_5`.start_date) = YEAR(CURRENT_DATE - INTERVAL 1 MONTH)
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • \What command keys do i use to fill data. I need this for return address labels

    What command keys do i use to fill data.I need this for return address labels

    Here's an overly chatty example that will show you what's happening:
    $strContacts = 'Tony Stark', 'Anthony Edward Stark'
    Write-Host 'User names:'
    $strContacts
    Write-Host
    foreach ($strContact in $strContacts ) {
    Write-Host "Start of loop. Processing $strContact now."
    $arrContact = $strContact.Split(' ')
    Write-Host
    Write-Host "$strContact has been split apart into individual array elements based on a space character. The elements are below:"
    $arrContact
    Write-Host
    Write-Host 'Start building filterName variable. Index of -1 gets the last element in the array.'
    $filterName = "$($arrContact[-1]), "
    $filterName
    Write-Host
    Write-Host "Loop through the remaining names in the contact. Need to process $($arrContact.Count-1) names."
    for ($i = 0 ; $i -lt $arrContact.Count - 1 ; $i++ ) {
    $filterName += "$($arrContact[$i]) "
    Write-Host "filterName variable is now $filterName"
    Write-Host
    Write-Host "Now we need to trim off the trailing space character."
    $filterName = $filterName.Trim()
    Write-Host "The final value of filterName is $filterName"
    Write-Host
    Write-Host 'Attempting to get the user object via Get-ADUser now:'
    Write-Host
    Get-ADUser -Filter "Name -eq '$filterName'"
    Write-Host 'End of loop.'
    Write-Host
    Don't retire TechNet! -
    (Don't give up yet - 12,575+ strong and growing)

  • Returning a sys_refcursor for XML data in a function

    As I typically write my queries in packages, and return sys_refcursor's to return data into a .NET DataSet via the OracleDataAdapter, I would like to know if it is possible to return the data using the OracleCommand.ExecuteXmlReader method to return XML results. None of the examples I have found delve into this area.
    Versions:
    ODP.NET : 10.2.X
    .NET : 2.0
    Firstly here is the function being called.
    <code>
    CREATE OR REPLACE FUNCTION XML_TEST_FUNC RETURN sys_refcursor
    AS
        l_serviceTable XML_SERVICE_TABLE_TYPE := XML_SERVICE_TABLE_TYPE();
        l_badgeTable XML_BADGE_TABLE_TYPE := XML_BADGE_TABLE_TYPE();
        l_cursor sys_refcursor;
    BEGIN
        FOR badgeRow IN (SELECT * FROM BADGE)
        LOOP
            FOR serviceRow IN (SELECT * FROM SERVICE WHERE BADGEID = badgeRow.BADGEID)
            LOOP
                l_serviceTable.extend;
                l_serviceTable(l_serviceTable.last) := XML_SERVICE_ROW_TYPE(serviceRow.SERVICEID, serviceRow.SERVICENAME);
            END LOOP;
            l_badgeTable.extend;
            l_badgeTable(l_badgeTable.last) := XML_BADGE_ROW_TYPE(badgeRow.BADGEID, badgeRow.BADGENAME, l_serviceTable);
        END LOOP;
        OPEN l_cursor FOR
        SELECT * FROM TABLE(l_badgeTable);
        RETURN l_cursor;
    END;
    </code>
    XML_BADGE_ROW_TYPE and XML_SERVICE_ROW_TYPE are object types and XML_BADGE_TABLE_TYPE and XML_SERVICE_TABLE_TYPE are table objects.
    I have done this as I want to return nested data of the Services that relate to a Badge.
    Here is the C# code I am using to try and return the function results.
    <code>
    _command = new OracleCommand("XML_TEST_FUNC", _connection);
    _command.CommandType = System.Data.CommandType.StoredProcedure;
    _command.BindByName = true;
    command.Parameters.Add(new OracleParameter("RETURNVALUE", OracleDbType.RefCursor));
    _command.Parameters["RETURN_VALUE"].Direction = System.Data.ParameterDirection.ReturnValue;
    _command.XmlCommandType = OracleXmlCommandType.Query;
    _command.XmlQueryProperties.RootTag = "RESULT_SET";
    _command.XmlQueryProperties.RowTag = "BADGE";
    _command.XmlQueryProperties.MaxRows = -1;
    _reader = _command.ExecuteXmlReader();
    _document = new XmlDocument();
    _document.PreserveWhitespace = true;
    _document.Load(_reader);
    </code>
    All i get is the following error:
    <error>
    Oracle.DataAccess.Client.OracleException ORA-01036: illegal variable name/number
    at Oracle.DataAccess.Client.OracleCommand.XmlHandleException(OracleException e)
    at Oracle.DataAccess.Client.OracleCommand.ExecuteXmlQuery(Boolean wantResult)
    at Oracle.DataAccess.Client.OracleCommand.ExecuteXmlReader()
    at OracleXmlTestApp.Program.Main(String[] args) in D:\Projects\OracleXmlTestApp\OracleXmlTestApp\Program.cs:line 35
    </error>
    Any suggestion would be greatly appreciated.

    That does work, but I you want to aim for tidy XML it provides more than you would want. eg:
    <ROWSET>
    <ROW>
      <XML_TEST_FUNC>
       <XML_TEST_FUNC_ROW>
       </XML_TEST_FUNC_ROW>
      </XML_TEST_FUNC>
      <XML_TEST_FUNC>
       <XML_TEST_FUNC_ROW>
       </XML_TEST_FUNC_ROW>
      </XML_TEST_FUNC>
    </ROW>
    </ROWSET>In-between the <XML_TEST_FUNC_ROW> you do end up with the data you want, but the extra tags do not look crash hot.
    I did attempt the use of the DBMS_XMLGEN package and was more successful where the output was more to my liking. eg:
    <MyBadges>
      <Badge>
        <BadgeID>500000001</BadgeID>
        <BadgeName>My Badge</BadgeName>
        <Services>
          <XML_SERVICE_ROW_TYPE>
            <ServiceID>600000005</ServiceID>
            <ServiceName>My Service</ServiceName>
          </XML_SERVICE_ROW_TYPE>
        </Services>
      </Badge>
    </MyBadges>The function called is as follows:
    CREATE OR REPLACE FUNCTION XML_TEST_FUNC_2 RETURN XMLTYPE
    AS
        l_serviceTable XML_SERVICE_TABLE_TYPE := XML_SERVICE_TABLE_TYPE();
        l_badgeTable XML_BADGE_TABLE_TYPE := XML_BADGE_TABLE_TYPE();
        l_cursor sys_refcursor;
        l_handle DBMS_XMLGEN.CTXHANDLE;
        l_result XMLTYPE;
    BEGIN
        FOR badgeRow IN (SELECT * FROM BADGE)
        LOOP
            l_serviceTable := XML_SERVICE_TABLE_TYPE();
            FOR serviceRow IN (SELECT * FROM SERVICE WHERE BADGEID = badgeRow.BADGEID)
            LOOP
                l_serviceTable.extend;
                l_serviceTable(l_serviceTable.last) := XML_SERVICE_ROW_TYPE(serviceRow.SERVICEID, serviceRow.SERVICENAME);
            END LOOP;
            l_badgeTable.extend;
            l_badgeTable(l_badgeTable.last) := XML_BADGE_ROW_TYPE(badgeRow.BADGEID, badgeRow.BADGENAME, l_serviceTable);
        END LOOP;
        OPEN l_cursor FOR
        SELECT * FROM TABLE(l_badgeTable);
        -- Get a handle to the XML document
        l_handle := DBMS_XMLGEN.NEWCONTEXT(l_cursor);
        -- Replace the default ROWSET tag with my own 
        DBMS_XMLGEN.SETROWSETTAG(l_handle, 'MyBadges');
        -- Remove the default ROW level tag with my own
        -- If I passed in text instead of NULL I would just change the element name
        -- I can leave it off altogther and get the default, canonical format 
        DBMS_XMLGEN.SETROWTAG(l_handle, 'Badge');
        -- Display null tags for empty columns
        DBMS_XMLGEN.SETNULLHANDLING(l_handle, dbms_xmlgen.EMPTY_TAG);
        -- Create an XML document out of the ref cursor
        l_result := DBMS_XMLGEN.GETXMLTYPE(l_handle);
        RETURN l_result;
    END;with the C# code as such:
    _command = new OracleCommand("XML_TEST_FUNC_2", _connection);
    _command.CommandType = CommandType.StoredProcedure;
    _command.Parameters.Add(new OracleParameter("RETURN_VALUE", OracleDbType.XmlType, ParameterDirection.ReturnValue));
    _command.ExecuteNonQuery();
    OracleXmlType _result = (OracleXmlType)_command.Parameters["RETURN_VALUE"].Value;
    _result.GetXmlDocument().Save("C:\\output.xml");Maybe a bit more work, but better result.
    Thanks for your help though, as it has provided other possiblities.

  • How to change language for date in ipad.

    Hi,
    I have ipad 4 with iOS 7.1. I bought it in Japan one week ago.Can any 1 tell me how to change the language for date. My calendar shows days and month typed in Japanese and I want to change it to English. I had selected my language as English, initially. Everything else is in English except for dates and months. I guess need to change some settings in the app calendars.

    Sorry, Settings >> General >> International >> Calendar. Change to Gregorian.

  • Wiping user data from iMac for return

    Hi,
    my replacement imac has arrived and this time the airport seems fine (see my previous post). Now I need to wipe all my user data off the other mac before it gets picked up for returns. What is the easiest / quickest way to do this?
    Thanks,
    Theo

    Use Apple Disk Utility. Go to "Options" and use at least a 7-Pass Erase. A simple erase will leave much of your data vulnerable to recovery by any unwanted source or person.
    Good luck.

  • Looking for Rental add-on that can handle flexible return dates

    Hi Forum,
    I am wondering which would be good add-on for rental industry that can handle flexible return dates (without cancelling original contract and creating a new one with actual date).
    I am wondering if Visnova's Rental add-on would handle flexible return dates without actually cancelling original contract and creating a new contract.
    Are there many ways to handle flexible rental return dates?
    Thanks.

    Hi,
    I have moved your thread here because you are looking for partner add-on instead of SAP add-on. Have you searched through this forum and SAP EcoHub ?
    Thanks,
    Gordon

  • Return billing type for POS data upload

    Hi,
    From the configuration, it only available for one billing type for POS upload. If i want to separate another billing type for return, how can i configure it. Thanks

    Hi ,
          You can create your custom billing type by navigating below menu
    Goto SPRO->Sales and Distribution -> Billing -> Billing documents -> Define billing types. Here select any one of the standard SAP billing type (which ever is relevant to your business like FP for Interface
    Billing - POS system), then click on copy as button to create a new one enter then give name for your new billing type for example ZFP, ZRE and then save it.
    BR
    Ajaya Kr. Mishra

  • Disco Report doesn't return data for a responsibilty

    Hi Guys,
    We have a report, we have shared with XXX Tax Manager. When we login through XXX Tax Manager, it doesn`t return data. But when we do similer with XXX Payables Manager, report runs fine and return data?
    Can any one help me on this.
    Note: Both Responsibility have access to the Business Area.
    Thanks,
    Nick

    Please find the below query:
    SELECT /*+ NOREWRITE */
    o101613.expense_account_num AS e264170,
    o271954.description AS e271961, o271954.po_number AS e272013,
    o271954.project AS e272033, o271954.task AS e272035,
    o271954.expenditure_type AS e272036, o272183.amount AS e275461,
    (o272183.gl_date) AS e275566, (o272183.invoice_date) AS e275578,
    o272183.invoice_id AS e275580, o275448.invoice_id AS e275581,
    o272183.invoice_number AS e275584,
    o272183.self_assessed_flag AS e275674,
    o272183.ship_to_location_code AS e275681, o272183.state AS e275685,
    o272183.tax_amount AS e275695,
    o272183.tax_jurisdiction_code AS e275698,
    o272183.tax_rate AS e275700, o272183.vendor_name AS e275720,
    o272183.vendor_number AS e275723, (o278494.gl_date) AS e278500,
    o278494.liability_account AS e278501
    FROM apfg_ap_invoices o101612,
    apfg_ap_invoice_distributions o101613,
    apps.ap_invoice_lines_v o271954,
    (SELECT ap.invoice_id, aps.vendor_name, aps.segment1 vendor_number,
    ap.invoice_num invoice_number, ap.invoice_date, ap.gl_date,
    apl.amount amount, zxl.tax_amt tax_amount,
    zxr.percentage_rate tax_rate, zxl.tax_jurisdiction_code,
    apl.ship_to_location_code, zxl.self_assessed_flag,
    hzg.geography_element2_code state, apl.line_number
    FROM ap.ap_suppliers aps,
    ap.ap_invoices_all ap,
    zx.zx_lines zxl,
    apps.ap_invoice_lines_v apl,
    zx.zx_rates_b zxr,
    zx.zx_jurisdictions_tl zxj,
    zx.zx_jurisdictions_b zxb,
    ar.hz_geographies hzg
    WHERE aps.vendor_id = ap.vendor_id
    AND ap.invoice_id = zxl.trx_id
    AND zxl.trx_id = apl.invoice_id
    AND zxl.trx_line_number = apl.line_number
    AND zxl.entity_code = 'AP_INVOICES'
    AND zxl.event_class_code = 'STANDARD INVOICES'
    AND zxl.self_assessed_flag = 'Y'
    --AND zxr.tax_rate_code         = zxl.tax_rate_code
    AND zxr.tax_rate_id = zxl.tax_rate_id
    AND zxj.tax_jurisdiction_id = zxl.tax_jurisdiction_id
    AND zxb.tax_jurisdiction_id = zxj.tax_jurisdiction_id
    AND zxb.zone_geography_id = hzg.geography_id
    AND zxl.tax_amt <> 0
    AND apl.line_type_lookup_code IN
    ('ITEM', 'FREIGHT', 'MISCELLANEOUS')
    AND apl.line_source IN
    ('HEADER MATCH',
    'MANUAL LINE ENTRY',
    'IMPORTED',
    'CHRG ITEM MATCH'
    AND ap.cancelled_date IS NULL
    ORDER BY aps.vendor_name, ap.invoice_num) o272183,
    apps.ap_invoices_v o275448,
    (SELECT xte.source_id_int_1 invoice_id, gcc.code_combination_id,
    xte.transaction_number, xal.accounting_date gl_date,
    gcc.segment1
    || '.'
    || gcc.segment2
    || '.'
    || gcc.segment3
    || '.'
    || segment4
    || '.'
    || segment5
    || '.'
    || segment6
    || '.'
    || segment7 liability_account
    FROM xla.xla_transaction_entities xte,
    xla.xla_ae_headers xah,
    xla.xla_ae_lines xal,
    gl.gl_code_combinations gcc
    WHERE 1 = 1
    AND xte.entity_id = xah.entity_id
    AND xte.application_id = xah.application_id
    AND xah.ae_header_id = xal.ae_header_id
    AND xal.accounting_class_code = 'SELF_ASSESSED_TAX_LIAB'
    AND xal.code_combination_id = gcc.code_combination_id) o278494
    WHERE ( (o101612.invoice_id = o101613.invoice_id(+))
    AND ( o101613.invoice_id = o271954.invoice_id
    AND o101613.invoice_line_number = o271954.line_number
    AND ( o272183.invoice_id = o271954.invoice_id
    AND o272183.line_number = o271954.line_number
    AND (o272183.invoice_id = o275448.invoice_id)
    AND (o278494.invoice_id = o275448.invoice_id)
    AND (o101613.dist_line_type_code IN
    ('ITEM', 'FREIGHT', 'MISCELLANEOUS'')')
    AND (o101612.invoice_number = :"Invoice Number ")
    AND ((o272183.gl_date) <= :"Ending GL DATE")
    AND ((o272183.gl_date) >= :"Beginning GL DATE")
    ORDER BY o271954.project ASC, o272183.invoice_number ASC;
    It does not contain any security profiles, only contains view that might be not returning data.
    thanks

  • Query for future dates returning data

    Hi,
    I am not sure why this is happening. I ran the following query in 3 separate databases supporting 3 diff applications on various tables. Some tables return data the others dont. I picked the tables randomly.
    The column 'createdt' stores the date on which the row was inserted.
    select * from <tablename> where to_char(createdt,'mm/dd/yyyy') between '01/04/2012' and '03/08/2012'; when the query is changed to:
    select * from <tablename>  where to_char(createdt,'yyyy') between '2012' and '2013';It consistently returns no data, as it should.
    Anyone knows why this is happening?
    Thanks.

    This statement:
    select * from <tablename> where to_char(createdt,'mm/dd/yyyy') between '01/04/2012' and '03/08/2012';uses alphabetical comparison. '02/12/2005' is between those two strings. In fact '02/<anything>' is between those two strings ;-)
    Use date comparison rather than string comparison:
    select * from <tablename>
    where createdt >= to_date('01/04/2012','mm/dd/yyyy')
      and createdt <  to_date('03/08/2012','mm/dd/yyyy') + 1;(The createdt <  to_date('03/08/2012','mm/dd/yyyy') + 1 is to make sure to get all of august 3rd, no matter what time it was ;-) )

  • Query in ASWE XML code doesn't return data

    Hello, since people on the Oracle Metalink site are to lazy to give an answer to this question. I'll try it via this forum. Here we go:
    I'm developing wireless applications running on Oracle9i Application Server Wireless Edition. I'v tried to implement the employee sample from Oracle Online Mobile Studio (studio.oraclemobile.com). The sample name is employee.jsp. This sample combines XML code with JSP.
    (code at the end of the text)
    When I test the sample I get no query results.
    When you take the first option for example, (search by dept number) the query result will not be displayed. I think it has something to do with the "executeQuery" line.
    rset = stmt.executeQuery("select * from EMP where EMPNO='" + empNum + "'");
    After giving the following input (employeenumber) 7369 (which excists in the
    database). I get the following errors:
    The panama server log returns the following error:
    1/14/02 5:19:28 PM NOTIFY : [Thread-13]
    core.XSLTransformerImpl.getXSLProc(XSLTransformerImpl.java:120)
    Create 10 number of XSL-processor for TINY_HTML
    1/14/02 5:19:35 PM NOTIFY : [Thread-15]
    adapter.URLAdapter.invoke(URLAdapter.java:240)
    URL = http://host/portal/test/employee.jsp
    1/14/02 5:19:37 PM NOTIFY : [Thread-17] adapter.URLAdapter.invoke(URLAdapter.java:240)
    URL =http://host/portal/test/employee.jsp?choice=empNum
    1/14/02 5:19:49 PM NOTIFY : [Thread-19]adapter.URLAdapter.invoke(URLAdapter.java:240)
    URL =http://host/portal/test/employee.jsp?&empNum=7369
    1/14/02 5:19:50 PM ERROR : [Thread-19]rt.common.Controller.reportServiceInvocationError(Controller.java:707)
    Service Invocation Error: Stream closed.
    The jserv.log returns the following error:
    [14/01/2002 17:19:50:431 CET] Invalid column name
    java.sql.SQLException: Invalid column name
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:273)
    at oracle.jdbc.driver.OracleStatement.get_column_index(OracleStatement.java:4383)
    at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:667)
    at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:1374)
    at portal.test._employee._jspService(_employee.java:201)
    at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java)
    at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java)
    at oracle.jsp.JspServlet.doDispatch(JspServlet.java)
    at oracle.jsp.JspServlet.internalService(JspServlet.java)
    at oracle.jsp.JspServlet.service(JspServlet.java)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
    at org.apache.jserv.JServConnection.processRequest(JServConnection.java:402)
    at org.apache.jserv.JServConnection.run(JServConnection.java:260)
    at java.lang.Thread.run(Thread.java:479)
    Does this have something to do with the encoding of the query result in the select statement? As you can see the variable is in the requeststring (URL = http://host/portal/test/employee.jsp?&empNum=7369)
    My database connection works fine (I've also tested the query using SQL plus and the SQL adapter also works).
    Is this the right statement?: ("select * from EMP where EMPNO='" + empNum + "'");
    I can not do anything with the error in the jserv.log (java.sql.SQLException: Invalid column name).
    The columnname EMPNO excists in the example table. The query in SQL plus gives a result.
    Can someone give my any suggestions?
    Thanks in advance.
    Thomas Wesseling, UCC
    ### Code of employee.jsp ###
    <?xml version="1.0" encoding="UTF-8"?>
    <SimpleResult>
    <SimpleContainer>
    <%@ page language="java" import="java.sql.*, java.util.*, java.text.* "%>
    <%
    //URL variables
    String choice = request.getParameter("choice");
    String empNum = request.getParameter("empNum");
    String lastName = request.getParameter("lastName");
    String jobTitle = request.getParameter("jobTitle");
    String deptNum = request.getParameter("deptNum");
    String notFoundMsg = null; //String for containing varying not found msg
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@172.16.0.51:1521:ora816", "scott", "tiger");
    Statement stmt = conn.createStatement();
    ResultSet rset = null;
    //**** Start of service - first card ****
    if (choice==null && empNum==null && lastName==null &&
    jobTitle==null && deptNum==null)
    %>
    <SimpleMenu title="Employee Search by:">
    <SimpleMenuItem target="employee.jsp?choice=empNum">Employee Number</SimpleMenuItem>
    <SimpleMenuItem target="employee.jsp?choice=lastName">Name</SimpleMenuItem>
    <SimpleMenuItem target="employee.jsp?choice=jobTitle">Job Title</SimpleMenuItem>
    <SimpleMenuItem target="employee.jsp?choice=deptNum">Dept Number</SimpleMenuItem>
    </SimpleMenu>
    <%
    //**** SECOND CARD - which search criteria ****
    if (choice!=null)
    if (choice.equals("empNum") && empNum == null)
    %>
    <!-- show search by employee number -->
    <SimpleForm target="employee.jsp?">
    <SimpleFormItem name="empNum" format="*N">Enter Employee Number: </SimpleFormItem>
    </SimpleForm>
    <%
    else if (choice.equals("lastName") && lastName == null)
    %>
    <!-- show search by last name -->
    <SimpleForm target="employee.jsp?">
    <SimpleFormItem name="lastName" format="*A">Enter Last Name: </SimpleFormItem>
    </SimpleForm>
    <%
    else if (choice.equals("jobTitle") && jobTitle == null)
    %>
    <!-- show search by job title -->
    <SimpleForm target="employee.jsp?">
    <SimpleFormSelect name="jobTitle" title="Enter Job Title:">
    <SimpleFormOption value="CLERK">Clerk</SimpleFormOption>
    <SimpleFormOption value="SALESMAN">Salesman</SimpleFormOption>
    <SimpleFormOption value="MANAGER">Manager</SimpleFormOption>
    <SimpleFormOption value="ANALYST">Analyst</SimpleFormOption>
    <SimpleFormOption value="PRESIDENT">President</SimpleFormOption>
    </SimpleFormSelect>
    </SimpleForm>
    <%
    else if (choice.equals("deptNum") && deptNum == null)
    %>
    <!-- show search by dept number -->
    <SimpleForm target="employee.jsp?">
    <SimpleFormItem name="deptNum" format="*N">Enter Dept Number: </SimpleFormItem>
    </SimpleForm>
    <%
    //**** THIRD CARD - query DB based on criteria ****
    //**** empNum entered as search criteria ****
    if (empNum != null) //empNum is entered as search criteria- NEED TO TEST FOR NON-int
    rset = stmt.executeQuery("select * from EMP where EMPNO='" + empNum + "'");
    if (rset.next()) //if rset returns data, show data
    do {
    %>
    <%@ include file="showResult.jsp" %>
    <%
    } while (rset.next());
    } //end rset.next() is true
    else
    notFoundMsg = "Employee Number " + empNum + " Not Found";
    %>
    <%@ include file="notFound.jsp" %>
    <% }
    } //end if empNum != null
    //**** lastName as search criteria ****
    else if (lastName != null)
    rset = stmt.executeQuery("select * from EMP where ENAME='" + lastName + "'");
    if (rset.next())
    do {
    %>
    <%@ include file="showResult.jsp" %>
    <%
    } while (rset.next());
    } //end rset.next is true
    else
    notFoundMsg = "Name " + lastName + " Not Found";
    %>
    <%@ include file="notFound.jsp" %>
    <% }
    } //end if lastName != null
    //**** jobTitle as search criteria ****
    else if (jobTitle != null)
    rset = stmt.executeQuery("select * from EMP where JOB='" + jobTitle + "'");
    if (rset.next())
    do {
    %>
    <%@ include file="showResult.jsp" %>
    <%
    } while (rset.next());
    } //end rset.next is true
    else
    notFoundMsg = "Job Title " + jobTitle + " Not Found";
    %>
    <%@ include file="notFound.jsp" %>
    <% }
    } //end if jobTitle != null
    //**** deptNum as search criteria ****
    else if (deptNum != null) //deptNum is entered as search criteria
    rset = stmt.executeQuery("select * from EMP where DEPTNO='" + deptNum + "'");
    if (rset.next())
    do {
    %>
    <%@ include file="showResult.jsp" %>
    <%
    } while (rset.next());
    else
    notFoundMsg = "Dept Number " + deptNum + " Not Found";
    %>
    <%@ include file="notFound.jsp" %>
    <% }
    } //end if deptNum != null
    conn.close();
    %>
    </SimpleContainer>
    </SimpleResult>
    ### Code of NotFound.jsp ###
    <SimpleText>
    <SimpleTextItem><%=notFoundMsg%></SimpleTextItem>
    <Action label="Search" type="ACCEPT" task="GO" target="employee.jsp?"></Action>
    </SimpleText>
    ### Code of ShowResult.jsp ###
    <%
    //format date from query
    java.sql.Date date = rset.getDate("HIREDATE");
    String hireDate = DateFormat.getDateInstance(DateFormat.MEDIUM).format(date);
    %>
    <SimpleText>
    <SimpleTextItem>Emp#: <%=rset.getString("EMPNO")%></SimpleTextItem>
    <SimpleTextItem>Name: <%=rset.getString("ENAME")%></SimpleTextItem>
    <SimpleTextItem>Job: <%=rset.getString("JOB")%></SimpleTextItem>
    <SimpleTextItem>Manager: <%=rset.getString("MGR")%></SimpleTextItem>
    <SimpleTextItem>Hire Date: <%=hireDate %></SimpleTextItem>
    <SimpleTextItem>Salary: <%=rset.getString("SAL")%></SimpleTextItem>
    <SimpleTextItem>Commission: <%=rset.getString("COMM")%></SimpleTextItem>
    <SimpleTextItem>Dept#: <%=rset.getString("DEPTNO")%></SimpleTextItem>
    <SimpleTextItem>Email: <%=rset.getString("EMAIL")%></SimpleTextItem>
    <SimpleTextItem>Phone: <%=rset.getString("PHONE")%></SimpleTextItem>
    <Action label="Search" type="SOFT1" task="GO" target="employee.jsp"></Action>
    <Action label="Call" type="OPTIONS" task="CALL" number="<%=rset.getString("PHONE")%>"></Action>
    </SimpleText>

    Is EMPNO really a string field and not a numeric field? Your query is like
    ... where EMPNO='1949'
    and should it perhaps be
    ... where EMPNO=1949
    ?

  • How to view the returned data from a stored procedure in TOAD?

    Hi,
    I created ref cursor in the stored procedure to return data. The stored procedure works fine, just want to view the result in TOAD. The BEGIN... EXEC... END can execute the stored procedure, but how to make the result display?
    Thanks!

    Right click the editor and choose
    "Prompt For Substitution Variables".
    Run for example the following code:
    DECLARE
    PROCEDURE p (cur OUT sys_refcursor)
    AS
    BEGIN
    OPEN cur FOR
    SELECT *
    FROM DUAL;
    END p;
    BEGIN
    p (:cur);
    END;
    The result will display in Toad's Data Grid!
    Regards Michael

  • I need the Log Report for the Data which i am uploading from SAP R/3.

    Hi All,
    I am BI 7.0 Platform with Support Patch 20.
    I need the Log Report for the Data which i am uploading from SAP R/3.
    I extract the DATA from R/3 into BI 7.0 DSO where I am mapping the GL Accounts with the FS Item.   In the Transformation i have return a routine on the FS Item InfObject . I am checking the Gl code into Z table for the FS Item .
    I capture the FS item from the Z table then update this FS item to Infobject FS item.
    Now i  need to stop the Data upload if i do not find the GL code in the Z table, and generate report for all GL code for which the FS item is not maintained in the Z table.
    Please suggest.
    Regards
    nilesh

    Hi.
    Add a field that you will use to identify if the GL account of the record was found in the Z table or not. Fx, create ZFOUND with length 1 and no text.
    In your routine, when you do the lookup, populate ZFOUND with X when you found a match (sy-subrc = 0) and leave it blank if you don't find a match. Now create a report filtering on ZFOUND = <blank> and output the GL accounts. Those will be the ones not existing in the Z table, but coming in from your transactions.
    Regards
    Jacob

Maybe you are looking for

  • Oracle 10g OEM high memory usage

    Hi, I am using oracle 10g SR2, after start the OEM, the CPU usage 100% and somethime will have out of memory heapdump and javacore in $ORACLE_HOME. I don't know what is the problem. pls help. The below msg is the part of javacore 0SECTION TITLE subco

  • How do I enable the hot swap function on motherboard MS-7758?

    Hi, I just installed a hot swap rack in my computer that runs windows 8.1. It shows up in device manager under Other devices->unknowns device, but the rack will not read a hard drive when i put one in it. I contacted the manufacturer of the hot swap

  • Smartform date formats not following SU3 setting or country settings.

    Hi, We have a smartform that has date fields that are to follow the format given in the country settings. But i cannot seem to make the fields be printed out by the country settings. Ís the variable field to be of a special type? I would rather not h

  • CPU Jul 2009 applied to a 10.2.0.4 DB. getting ORA-01418

    Hi all I have a question about the latest Database CPU patch I have just applied it to our UAT system and I am getting the following error in the log file generated. SQL> alter index xdb.xdbhi_idx rebuild; alter index xdb.xdbhi_idx rebuild ERROR at l

  • Exe behaves inconsistently with input data into a cluster

    I'm on Labview 2011, SP1, so this may have been updated, but here's a quirk I discovered. I was reading a network shared variable on a remote machine (with 7 integers) into a labview built app (exe) and passing those integers to a cluster used for co