XSQL and To_Date

Hi,
Here is my problem:
if I perform a query like
select my_date
from my_table
in SQL*Plus, I get results looking like this:
my_date
30.01.01
However, if I use the same query in a XSQL page, I get elements like:
<my_date>30/01/2001 0:0:0</my_date>
Using the To_date function:
select To_date(my_date, 'DD.MM.YY') as my_date
from my_table
returns the same in XSQL.
Am I doing something wrong? How can I get formatted dates?
Thank you in advance.

Simplest way is to use TO_CHAR(my_date) as mydate

Similar Messages

  • A view, function and TO_DATE causing an error.

    I have the following statement which calls a view, VW_DIST_RPT_WORK_LIST which in turn calls a function which returns either 'Null' or a date string e.g. '07 Oct 2003' as a VARCHAR2 (alias PROJECTED_DELIVERY_DATE).
    Statement:
    SELECT CUSTOMER_NAME, PROTOCOL_REFERENCE, SHIPPING_REFERENCE, CUSTOMER_REFERENCE, COUNTRY, PROJECTED_DELIVERY_DATE, STATUS, NOTES,
    TO_DATE(PROJECTED_DELIVERY_DATE)
    FROM VW_DIST_RPT_WORK_LIST
    WHERE EXPECTED_DESP_DT IS NOT NULL
    AND UPPER(PROJECTED_DELIVERY_DATE) NOT LIKE('NULL%')
    AND EXPECTED_DESP_DT <= TO_DATE('07/10/2003', 'DD/MM/YYYY')
    AND TO_DATE(PROJECTED_DELIVERY_DATE) <= TO_DATE('31/12/2003', 'DD/MM/YYYY') --< Problem here
    I need to be able to specify a date filter on the PROJECTED_DELIVERY_DATE field and hence used the TO_DATE(PROJECTED_DELIVERY_DATE) <= TO_DATE('31/12/2003', 'DD/MM/YYYY') but this is generating an ORA-01858: a non-numeric character was found where a numeric character was expected.
    I think the problem lies with the fact that this field can contain 'Null' which cannot be converted to a date using TO_DATE. I've tried adding a NOT LIKE ('NULL%') statement to catch any nulls which may be creeping in bu this doesn't solve the problem.
    I've added TO_DATE(PROJECTED_DELIVERY_DATE) to the select above to determine if the nulls are being caught and if the TO_DATE in performing the conversion correctly which it is on both counts.
    Any ideas anyone ?

    The answer provided above by Monika will work for this situation. However, you should seriously think whether you should be using a string for date datatype. Ideally, you should rewrite the function that returns PROJECTED_DELIVERY_DATE and change the return type to DATE. The least you should do is to return NULL (instead of the string 'NULL') from the function. Oracle handles nulls perfectly, there is no reason you should write code to handle nulls;
    One more thing. Looking at the type of error you are receiving, it seems that you are using rule based optimizer. Why do I think so? Because, in rule based optimizer, the conditions are evaluated in a specific order (viz, bottoms-up for AND clauses). To show this, look at the following simple demonstration. I did this in Oracle 8.1.6 (also in 9.2.0.4.0 on Windows).
    -- Check the database version
    select * from v$version;
    BANNER
    Oracle8i Enterprise Edition Release 8.1.6.1.0 - Production
    PL/SQL Release 8.1.6.1.0 - Production
    CORE 8.1.6.0.0 Production
    TNS for Solaris: Version 8.1.6.0.0 - Production
    NLSRTL Version 3.4.0.0.0 - Production
    -- Create the test table
    create table test (a number(2));
    insert into test(a) values (0);
    insert into test(a) values (1);
    insert into test(a) values (2);
    insert into test(a) values (3);
    insert into test(a) values (4);
    insert into test(a) values (5);
    insert into test(a) values (6);
    insert into test(a) values (7);
    commit;
    -- See that I have not analyzed the table. This will make use of RULE based optimizer
    select * from test
    where a > 0
    and 1/a < .25;
    and 1/a < .25
    ERROR at line 3:
    ORA-01476: divisor is equal to zero
    -- Look at the query clause. Even though I specifically asked for records where a is positive
    -- the evaluation path of rule based optimizer started at the bottom and as it evaluated the
    -- first row with a=0, and caused an error.
    -- Now look at the query below. I just re-arranged the conditions so that a > 0 is evaluated
    -- first. As a result, the row with a=0 is ignored and the query executes without any problem.
    select * from test
    where 1/a < .25
    and a > 0;
    A
    5
    6
    7
    -- Now I analyze the table to create statistics. This will make the query use the
    -- cost based optimizer (since optimizer goal is set to CHOOSE)
    analyze table test compute statistics;
    Table analyzed.
    -- Now I issue the erring query. See it executes without any problem. This indicates that
    -- the cost based optimizer was intelligent enough to evaluate the proper path instead of
    -- looking only at the syntax.
    select * from test
    where a > 0
    and 1/a < .25;
    A
    5
    6
    7
    Does the above example seem familiar to your case? Even though you had the AND UPPER(PROJECTED_DELIVERY_DATE) NOT LIKE('NULL%') in your query, a record with PROJECTED_DELIVERY_DATE = 'NULL' was evaluated first and that caused the error.
    Summary
    1. Use dates for dates and strings for strings
    2. Use cost based optimizer
    Thanks
    Suman

  • What is the difference between TO_CHAR and TO_DATE()?

    Hi everybody,
    i am facing a problem in my system.It is quite urgent, can you explain me "What is the difference between TO_CHAR and TO_DATE()?".
    According to user's requirement, they need to generate a code with format "YYMRRR".
    YY = year of current year
    M = month of current month (IF M >=10 'A' ,M >=11 'B' , M >=10 'C')
    RRR = sequence number
    Example: we have table USER(USER_ID , USER_NAME , USER_CODE)
    EX: SYSDATE = "05-29-2012" MM-DD-YYYY
    IF 10
    ROW USER_ID , USER_NAME , USER_CODE
    1- UID01 , AAAAA , 125001
    2- UID02 , AAAAA , 125002
    10- UID010 , AAAAA , 12A010
    This is the original Script code. But This script runs very well at my Local. Right format. But it just happens wrong format on production.
    12A010 (Right) => 11C010 (Wrong).
    SELECT TO_CHAR(SYSDATE, 'YY') || DECODE( TO_CHAR(SYSDATE, 'MM'),'01','1', '02','2', '03','3', '04','4', '05','5', '06','6', '07','7', '08','8','09','9', '10','A', '11','B', '12','C') ||     NVL(SUBSTR(MAX(USER_CODE), 4, 3), '000') USER_CODE FROM TVC_VSL_SCH                                                       
         WHERE TO_CHAR(SYSDATE,'YY') = SUBSTR(USER_CODE,0,2)                         
         AND TO_CHAR(SYSDATE,'MM') = DECODE(SUBSTR(USER_CODE,3,1),'1','01',          
              '2','02', '3','03', '4','04', '5','05',          
              '6','06', '7','07', '8','08', '9','09',          
              'A','10', 'B','11', 'C','12')                    
    I want to know "What is the difference between TO_CHAR and TO_DATE()?".

    try to use following select
    with t as
    (select TO_CHAR(SYSDATE, 'YY') ||
             DECODE(TO_CHAR(SYSDATE, 'MM'),
                    '01', '1',
                    '02', '2',
                    '03', '3',
                    '04', '4',
                    '05', '5',
                    '06', '6',
                    '07', '7',
                    '08', '8',
                    '09', '9',
                    '10', 'A',
                    '11', 'B',
                    '12', 'C') as code
        from dual)
    SELECT t.code || NVL(SUBSTR(MAX(USER_CODE), 4, 3), '000') USER_CODE
      FROM TVC_VSL_SCH
    WHERE SUBSTR(USER_CODE, 1, 3) = t.codeand yes you need check time on your prodaction server
    good luck
    Edited by: Galbarad on May 29, 2012 3:56 AM

  • Bad performance due to the use of AGO and TO_DATE time series functions

    Hi all,
    I'm building an OBI EE Project on top of a 1TB DW, and i'm facing major performance problems due to the use of the AGO and TO_DATE time series functions in some of the Metrics included on the reports. I discovered that when a report with one of those metrics is submited to the DB, the resulting query/explain plan is just awful!... Apparently OBI EE is asking the DB to send everything it needs to do the calculations itself. The CPU cost goes to the roof!
    I've tried new indexes, updated statistics, MV's, but the result remains the same, i.e., if you happen to use AGO or TO_DATE in the report you'll get lousy query time...
    Please advise, if you have come across the same problem.
    Thanks in advance.

    Nico,
    Combining the solution to view the data in dense form (http://gerardnico.com/wiki/dat/obiee/bi_server/design/obiee_densification_design_preservation_dimension), and the use of the lag function (http://gerardnico.com/wiki/dat/obiee/presentation_service/obiee_period_to_period_lag_lead_function) appears to be the best solution for us.
    Thanks very much.

  • PLSQL and to_date query returning error...

    I'm sure this has something to do with a conversion which I'm not understanding however :
    Metric_date field is a DATE type field in the database.
    DECLARE
    disknum NUMBER;
    diskcost NUMBER;
    fystart VARCHAR(20):='01-JUN-'||(:FINANCE_FY-1);
    fyend VARCHAR(20):='31-MAY-'||:FINANCE_FY;
    BEGIN
    select metric_value into disknum from
       (SELECT metric_value from core_metrics where metric_subname='TIER_1_DISK_NUMBER' and metric_date between to_date(fystart,'DD-MON-YYYY') and to_date(fyend,'DD-MON-YYYY')  order by metric_date DESC)
    where rownum=1;
    select metric_value into diskcost from
    (SELECT metric_value from core_metrics where metric_subname='TIER_1_COST_PER_DISK' and metric_date between to_date(fystart,'DD-MON-YYYY') and to_date(fyend,'DD-MON-YYYY') order by metric_date DESC)
    where rownum=1;
    RETURN to_char((disknum*diskcost)/5,'$999,999,999');
    END;When executed I get
    Error computing item source value for page item P17_VMAX_TIER1_DISK_COST_SUM.
    ORA-01840: input value not long enough for date format
    Technical Info (only visible for developers)
    is_internal_error: true
    apex_error_code: WWV_FLOW_FORMS.ITEM_SOURCE_ERR
    ora_sqlcode: -1840
    ora_sqlerrm: ORA-01840: input value not long enough for date format
    component.type: APEX_APPLICATION_PAGE_ITEMS
    component.id: 14284527609957008
    component.name: P17_VMAX_TIER1_DISK_COST_SUM
    error_backtrace:
    ORA-06512: at line 8
    ORA-06512: at line 19
    ORA-06512: at "SYS.DBMS_SYS_SQL", line 1926
    ORA-06512: at "SYS.WWV_DBMS_SQL", line 966
    ORA-06512: at "SYS.WWV_DBMS_SQL", line 992
    ORA-06512: at "APEX_040100.WWV_FLOW_DYNAMIC_EXEC", line 503
    ORA-06512: at "APEX_040100.WWV_FLOW_FORMS", line 611Edited by: bostonmacosx on Mar 28, 2013 2:42 PM

    Thanks for all the help and I'm close to getting this nailed down:
    DECLARE
    defnumber NUMBER:=0;
    disknum NUMBER;
    diskcost NUMBER;
    fystart VARCHAR(20):='01-JUN-'||(:FINANCE_FY-1);
    fyend VARCHAR(20):='31-MAY-'||:FINANCE_FY;
    BEGIN
    if :FINANCE_FY is NULL THEN
    return 'hello';
    end if;
    select metric_value into disknum from
       (SELECT metric_value from core_metrics where metric_subname='TIER_1_DISK_NUMBER' and metric_date between to_date(fystart,'DD-MON-YYYY') and to_date(fyend,'DD-MON-YYYY')  order by metric_date DESC)
    where rownum=1;
    select metric_value into diskcost from
    (SELECT metric_value from core_metrics where metric_subname='TIER_1_COST_PER_DISK' and metric_date between to_date(fystart,'DD-MON-YYYY') and to_date(fyend,'DD-MON-YYYY') order by metric_date DESC)
    where rownum=1;
    RETURN to_char((disknum*diskcost)/5,'$999,999,999');
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
        return disknum;
    END; What I am running into though is that I want to return some text if :Finance_FY is not set to let the user know what is happening. However the RETURN is not allowing me to return anything except one of my variables....in fact I can't even RETURN defnumber.
    I thought I could return a string or a number.
    The above is a function for a Page Item of type "Display Only"
    The error I get is
    Error computing item source value for page item P17_VMAX_OTHER_THAN_DISK.
    ORA-06502: PL/SQL: numeric or value error
    Technical Info (only visible for developers)
    is_internal_error: true
    apex_error_code: WWV_FLOW_FORMS.ITEM_SOURCE_ERR
    ora_sqlcode: -6502
    ora_sqlerrm: ORA-06502: PL/SQL: numeric or value error
    component.type: APEX_APPLICATION_PAGE_ITEMS
    component.id: 14298319812267057
    component.name: P17_VMAX_OTHER_THAN_DISK
    error_backtrace:
    ORA-06512: at line 3
    ORA-06512: at line 7
    ORA-06512: at "SYS.DBMS_SYS_SQL", line 1926
    ORA-06512: at "SYS.WWV_DBMS_SQL", line 966
    ORA-06512: at "SYS.WWV_DBMS_SQL", line 992
    ORA-06512: at "APEX_040100.WWV_FLOW_DYNAMIC_EXEC", line 503
    ORA-06512: at "APEX_040100.WWV_FLOW_FORMS", line 611

  • XSQL and Packaged Procedure

    I've been reading thru the postings for XSQL and read a couple of references on how to get an out variable from a stored procedure. I read this thread from 3/31:
    http://technet.oracle.com:89/ubb/Forum11/HTML/001444.html
    Anyway, I followed the advice and I get the following error message:
    ORA-06571: Function CHECK_USER does not guarantee not to update database
    Did some research and found that I would need to create a PRAGMA in my function, which would need to be packaged. I did that, but the function would not compile because it would not fulfil the pragma. Below is the procedure I am trying to run, the wrapper function, and the XSQL source. Any ideas?
    Thanks
    Procedure
    Procedure check_user( inSiteID varchar2,
    v_userid number default null,
    inExtID varchar2 default null,
    v_return out varchar2)
    AS
    ParamIsNull EXCEPTION;
    invalid_data EXCEPTION;
    v_errmsg varchar2(200);
    v_count number := 0;
    BEGIN
    If v_userid Is Null AND inExtID Is Null Then Raise ParamIsNull; End If;
    If v_userid Is Not Null AND inExtID Is Not Null Then Raise ParamIsNull; End If;
    If v_userid Is Not Null Then
    SELECT COUNT(1) INTO v_count FROM USERS WHERE site_id=inSiteID and USERID = v_userid;
    If v_count = 0 then
    v_errmsg := '0, UserID Not Found';
    raise invalid_data;
    Else
    v_return:=('1');
    End if;
    End If;
    If inExtID Is Not Null Then
    SELECT COUNT(1) INTO v_count FROM USERS WHERE site_id=inSiteID and ext_uid = inExtID;
    If v_count = 0 then
    v_errmsg := '0, External ID Not Found';
    raise invalid_data;
    Else
    v_return:=('1');
    End if;
    End If;
    EXCEPTION
    WHEN ParamIsNull THEN
    v_return:=('0,1 Parameter Expected');
    WHEN invalid_data THEN
    v_return:=v_errmsg;
    END check_user;
    Function
    CREATE OR REPLACE PACKAGE DON AS
    FUNCTION CHECK_USER (siteid IN VARCHAR2, userid IN NUMBER, extid IN VARCHAR2)
    RETURN VARCHAR2;
    PRAGMA RESTRICT_REFERENCES (CHECK_USER, WNDS);
    END DON;
    CREATE OR REPLACE PACKAGE BODY DON AS
    FUNCTION CHECK_USER (siteid IN VARCHAR2, userid IN NUMBER, extid IN VARCHAR2)
    RETURN VARCHAR2 IS v_return VARCHAR2(200);
    BEGIN
    OTS_SCOPUS_PACK.CHECK_USER(siteid, userid, extid, v_return);
    RETURN v_return;
    END;
    END DON;
    XSQL Source
    <?xml version="1.0"?>
    <xsql:query xmlns:xsql="urn:oracle-xsql" connection="mvdv">
    select don.check_user('{@siteid}', {@userid}, '{@extid}') from dual
    </xsql:query>

    Your 'DON.CHECK_USER' function has a RESTRICT_REFERENCES pragma but it calls 'OTS_SCOPUS_PACK.CHECK_USER' which must also have a RESTRICT_REFERENCES pragma.
    All functions/procedures that are called directly or indirectly by 'DON.CHECK_USER' need to have a RESTRICT_REFERENCES pragma to guarantee that they do not write to the database or to a package.
    You cannot just write a wrapper function and apply the pragma to it.
    Good luck!
    null

  • Server running xsql and JSP

    I made a xsql file (sql in xml file) and I want to deploy it. I have made JSP files too.
    Which server can run xsql and JSP files?
    Oracle 8.1.6 can run xsql and JSP files?
    Thank you

    Check out the [MIMES] section of webtogo.ora file which is located in %JDEVHOME%\lib. There is an entry which defines the handler for .xsql files (which in this case is the XSQL Servlet (oracle.xml.xsql.XSQLServlet). Same goes for jsps. You can run this on any Java enabled web server.
    The version of OAS which will provide this functionality is the soon expected 4.0.8.2

  • XSQL and BEA Weblogic 6.1

    I spent a lot of time trying to figure out how to configure
    the XSQL servlet to run on BEA Weblogic 6.1
    It is really simple once you understand that you should work
    off expanded directory instead of trying to get a .war or .ear
    file uploaded.
    I decided to give my explanation to help others...
    This works with the current XDK (9.0.2.0.0D) on OTN and I got it
    running on Windows 2000 and/or Solaris.
    I based these instructions on Steve Muench for
    "ANN Deploy Oracle XSQL Pages to OC4J" off the OTN web site.
    1) get the latest xdk_java off the OTN web site.
    2) create a directory (or subdirectory) named xsql (to hold the entire application
    3) create /xsql/META-INF
    /xsql/WEB-INF
    /xsql/WEB-INF/lib
    /xsql/WEB-INF/classes
    structure to hold the XSQL servlet
    4) create a /xsql/META-INF/application.xml with the following code:
    <!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN'
    'http://java.sun.com/j2ee/dtds/application_1_2.dtd'>
    <application>
    <display-name>Oracle XSQL Servlet</display-name>
    <description>Oracle XSQL Servlet</description>
    <module>
    <web>
    <web-uri>xsql.war</web-uri>
    <context-root>xsql</context-root>
    </web>
    </module>
    </application>
    5) create the file /xsql/WEB-INF/web.xml with the following content
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
    <web-app>
    <servlet>
    <servlet-name>oracle-xsql-servlet</servlet-name>
    <servlet-class>oracle.xml.xsql.XSQLServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>oracle-xsql-servlet</servlet-name>
    <url-pattern>*.xsql</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>oracle-xsql-servlet</servlet-name>
    <url-pattern>/xsql/*</url-pattern>
    </servlet-mapping>
    </web-app>
    6)extract the xdk_java (that you copied from the OTN) on a temporary directory. (/otn)
    7) copy the following files (they are in the /otn/lib subdirectory) into /xsql/WEB-INF/lib
    oraclexsql.jar
    xsqlserializers.jar
    xmlparserv2.jar
    xsu12.jar
    8) copy /otn/xdk/admin/XSQLConfig.xml to xsql/WEB-INF/classes
    9) copy the entire directory and subdir /otn/xdk/demo/java/xsql to /xsql/demo
    10) no need to create a war or ear file as Weblogic will work better from the expanded directory
    anyway and it is simpler to implement.
    11) Now you need to copy that entire directory structure /xsql over to the Weblogic Application Server
    config/domain-name/applications area so in my case it is
    /bea/wlserver6.1/config/your_domain/applications/xsql
    12) If Weblogic is running in development mode, it should deploy and load the servlet automatically.
    If it is running in production mode, then we would need to restart it.
    13) You should be able to test this with http://your_host:7001/xsql/demo/index.html
    Any URL that specifies the /xsql will then be treated by the
    XSQL Servlet.
    It works for me...

    Hi Denis,
    I followed your procedure to deploy XSQL Servlet on WebLogic 6.1. First I deployed as expanded directory structure although I turned 'Auto Deployed Enabled' flag to on for my domain, WebLogic couldn't pick up the application. Then I tried to create ear application and deployed it (In your message you are saying that don't need to create ear or war, you mean this is not just a necessity or it never could be deployed as ear/war files). I saw on the as deployed on console but when I tried the http://myhost:7001/xsql/demo/index.html, I got the following error message.
    Oracle XDK Java 9.2.0.2.0 Production
    XSQL-013: XSQL Page URI is null or has an invalid format.
    Oracle XDK Java 9.2.0.2.0 Production
    XSQL-013: XSQL Page URI is null or has an invalid format.
    Can you help me to trouble shoot this problem? Thank you very much
    Deha Peker

  • XSQL and insert

    This may sound like a dumb question but I can't figure out how to associate the xml doc with the xsql doc to do an insert. Here are my files:
    XSQL - filename custins.xsql
    <?xml version="1.0" ?>
    <xsql:insert-request table="CUSTOMERS_OV" connection="dev7" xmlns:xsql="urn:oracle-xsql"/>
    XML - No file name, genned on the fly in javascript
    <?xml version='1.0'?>
    <ROWSET><ROW>
    <CUST_NO>1</CUST_NO>
    </ROW></ROWSET>
    I call custins.xsql as a submit from a form. The xml is dynamically created and I pass it as a parameter, i.e.
    http://localhost:7070/custins.xsql?docxml=<?xml version='1.0'?><...etc>
    What I get when I do this is:
    <?xml version="1.0" ?>
    <xsql-status action="xsql:insert-request" result="No posted document to process" />
    Can anyone tell what I'm doing wrong?
    Thanks,
    Lewis
    null

    Got it figured out. I was using method="get" while debugging and xsql expects it to be post.
    Now I'm getting:
    <?xml version="1.0" ?>
    - <xsql-error action="xsql:insert-request">
    <message>Exception ' The XML element tag 'DocXml' does not match the name of any of the columns/attributes of the target database object.' encountered during processing ROW element 0All prior XML row changes were rolled back. in the XML document.</message>
    </xsql-error>
    Which I'm assuming means that it wants to parse out the parameters instead of me making an xml doc. The problem with that is my data resides in 3 frames, across 7 forms. How do I handle this?
    I'll post this question with a new topic.
    null

  • Xsql and Stored Procedures/Packages

    I need to call a stored proc that includes a select statement through XSQL. The procedure returns a ResultSet. I have not been able to find a way to bind this parameter, or to return this ResultSet. Has anybody tried to do this?
    TIA

    The <xsql:ref-cursor-function> exists for just this purpose.
    If you already have a function that returns a REF CURSOR in an OUT parameter of a procedure, just write a wrapper function that returns that OUT value as the return value of a function and then use <xsql:ref-cursor-function> to repurpose it's results as XML in your XSQL page.

  • XSQL and HttpSession object availability

    Hello,
    How to access the very convenient unique HttpSession unique ID?
    The one we have this way within a servlet:
    HttpSession session = request.getSession(true);
    System.out.println(session.getId());
    Thank You in advance
    JRoch
    null

    You can access this easily by writing a custom action handler. Here is the code for a custom action handler that sets the value of the Http Session id into a page parameter named "session-id".
    import oracle.xml.xsql.*;
    import java.sql.SQLException;
    import org.w3c.dom.Node;
    import javax.servlet.http.*;
    public class GetSessionId extends XSQLActionHandlerImpl {
    public void handleAction( Node rootNode ) throws SQLException {
    XSQLPageRequest req = getPageRequest();
    if (req.getRequestType().equals("Servlet")) {
    HttpSession sess =
    ((XSQLServletPageRequest)req).getHttpServletRequest().getSession(true);
    if (sess != null) {
    req.setPageParam("session-id",sess.getId());
    }Then from within your XSQL page, you can say:
    <xsql:action handler="GetSessionId"/>
    and then later in the page refer to the parameter named session-id to access it's value as a lexical or bind parameter.

  • XSQL and WebLogic 6.0

    I am trying to set up xsql in WebLogic version 6.0. I can set up to run any stand alone servlet but how to tell it to run XSQLSERVLET when extension is .xsql? I've seen in WebLogic 5.1 you do it by setting weblogic.httpd.webApp.xsql=directory with xsql jar file but version 6.0 doesn't have weblogic.properties.

    WLS 6.0 will be supported in the next release of WLCS, which is due in the
    spring.
    - Ginny
    "aamerG" <[email protected]> wrote in message
    news:3a5cb774$[email protected]..
    Hi everyone,
    we are starting a new development project and would like to use Weblogic
    6.0. How soon do you think there we be a version of WLCS which works with
    6.0.
    TIA

  • Alter session set NLS_DATE_FORMAT and to_date not working

    Hey folks,
    for the sake of simplicity let's assume i want to get the current system time from the table dual in a certain format, e.g. 'YY.MM.DD'.
    Currently the query
    select sysdate from dual;
    yields:
    07-JAN-08
    The desired output should look like this:
    08.01.07
    So, according to the manual, i tried the following:
    alter session set NLS_DATE_FORMAT = 'yy.mm.dd';
    No effect, date is still displayed as
    07-JAN-08
    Even the following query:
    select TO_DATE (sysdate, 'yy.mm.dd') from dual;
    yields
    07-JAN-08
    What am i doing wrong here?
    Additional information:
    -> DB is Oracle 9
    -> I am using the Oracle SQL Developer under Ubuntu Gutsy
    -> No, i did not forget to commit my commands....:-)
    Any ideas?

    select TO_CHAR (sysdate, 'yy.mm.dd') from dual;However the alter session command should work:
    SQL*Plus: Release 9.2.0.2.0 - Production on Mon Jan 7 14:32:26 2008
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.8.0 - Production
    SQL> alter session set NLS_DATE_FORMAT = 'yy.mm.dd';
    Session altered.
    SQL> select sysdate from dual;
    SYSDATE
    08.01.07
    SQL> Note: There is nothing to commit here. Only selects, no DML.
    Message was edited by:
    Sven W.

  • XMLTABLE() with XSQL and XSL

    HI Gentlemen,
    I have an XMLTYPE table with data loaded in it, which I would like to query with JDeveloper, formatted. For normal relational tables it works fine. However, for an XMLTYPE table, where--in addition--XMLTABLE() must be involved, I only get the constant text portions, not the selected values. (Note that the same works with XML instances file and XSL stylesheet excellently, without JDeveloper.) My question is: How can I reference a coulumn in an XMLTABLE() table that is constructed during query?
    Included is the following:
    (1) XSQL file in JDeveloper
    (2) XSL stylesheet file in JDeveloper
    (3) Output of XSQL from JDeveloper when the <?xml-stylesheet...> is commented out
    Please help if you have an idea.
    (1) XSQL file under public-html
    <?xml version="1.0" encoding='windows-1252'?>
    <?xml-stylesheet type="text/xsl" href="untitled1.xsl" ?>
    <page xmlns:xsql="urn:oracle-xsql" connection="gksconnection">
    <xsql:query xmlns:xsql="urn:oracle-xsql" >
    SELECT
    des.ziffer,
    des.kap_bez,
    des.bereich,
    des.kapitel,
    des.abschnitt,
    des.kurztext,
    des.langtext,
    des.quittungstext
    FROM
    z p,
    XMLTable(XMLNAMESPACES('urn:ehd/001' as "n1", 'urn:ehd/go/001' as "n2"),
                        'for $i in /n1:ehd
    where $i/n1:header/n1:provider/n1:organization/n1:id/@EX eq "46" and
                        $i/n1:body/n2:gnr_liste/n2:gnr/@V eq "01700V"
                   return $i/n1:body/n2:gnr_liste/n2:gnr[@V="01700V"]'
    PASSING p.xml_document
    COLUMNS
    ziffer      VARCHAR2(12) PATH '@V',
    kap_bez VARCHAR2(255) PATH 'n2:allgemein/n2:legende/n2:kap_bez/@DN',
    bereich VARCHAR2(255) PATH 'n2:allgemein/n2:legende/n2:kap_bez/n2:bereich/@DN',
    kapitel VARCHAR2(255) PATH 'n2:allgemein/n2:legende/n2:kap_bez/n2:kapitel/@DN',
    abschnitt VARCHAR2(255) PATH 'n2:allgemein/n2:legende/n2:kap_bez/n2:abschnitt/@DN',
    kurztext      VARCHAR2(255) PATH 'n2:allgemein/n2:legende/n2:kurztext/@V',
    langtext      VARCHAR2(255) PATH 'n2:allgemein/n2:legende/n2:langtext/@V',
    quittungstext VARCHAR2(255) PATH 'n2:allgemein/n2:legende/n2:quittungstext/@V') des
    <!-- select * from z -->
    </xsql:query>
    </page>
    (2) XSL stylesheet under public-html
    <?xml version="1.0" encoding="windows-1252" ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:ehd="urn:ehd/001" xmlns:pe="urn:ehd/go/001">
    <xsl:output encoding="ISO-8859-1" method="text/html" />
    <xsl:template match="/page">
    <html>
    <head>
    <title>EBM Ziffer</title>
    </head>
    <body style="font-family:verdana;color:black">
    <h2><xsl:text>Ziffer: </xsl:text>
    <xsl:value-of select="@V"/>
    </h2>
    <table border="1">
    <tr>
    <td><xsl:text>Gültigkeit</xsl:text></td>
    <td><xsl:value-of select="pe:allgemein/pe:gueltigkeit/pe:service_tmr/@V"/></td>
    </tr>
    <tr>
    <td><xsl:text>Bezeichnung Kapitel</xsl:text></td>
    <td><xsl:value-of select="pe:allgemein/pe:legende/pe:kap_bez/@V"/>
    <xsl:text> </xsl:text>
    <xsl:value-of select="pe:allgemein/pe:legende/pe:kap_bez/@DN"/></td>
    </tr>
    <tr>
    <td><xsl:text>Bereich</xsl:text></td>
    <td><xsl:value-of select="pe:allgemein/pe:legende/pe:kap_bez/pe:bereich/@V"/>
    <xsl:text> </xsl:text>
    <xsl:value-of select="pe:allgemein/pe:legende/pe:kap_bez/pe:bereich/@DN"/></td>
    </tr>
    <tr>
    <td><xsl:text>Kapitel</xsl:text></td>
    <td><xsl:value-of select="pe:allgemein/pe:legende/pe:kap_bez/pe:kapitel/@V"/>
    <xsl:text> </xsl:text>
    <xsl:value-of select="pe:allgemein/pe:legende/pe:kap_bez/pe:kapitel/@DN"/></td>
    </tr>
    <tr>
    <td><xsl:text>Abschnitt</xsl:text></td>
    <td><xsl:value-of select="pe:allgemein/pe:legende/pe:kap_bez/pe:abschnitt/@DN"/></td>
    </tr>
    <tr>
    <td><xsl:text>Unterabschnitt</xsl:text></td>
    <td><xsl:value-of select="pe:allgemein/pe:legende/pe:kap_bez/pe:uabschnitt/@DN"/></td>
    </tr>
    <tr>
    <td><xsl:text>Block</xsl:text></td>
    <td><xsl:value-of select="pe:allgemein/pe:legende/pe:kap_bez/pe:block/@DN"/></td>
    </tr>
    <tr>
    <td><xsl:text>Kurztext</xsl:text></td>
    <td><xsl:value-of select="pe:allgemein/pe:legende/pe:kurztext/@V"/></td>
    </tr>
    <tr>
    <td><xsl:text>Langtext</xsl:text></td>
    <td><xsl:value-of select="pe:allgemein/pe:legende/pe:langtext/@V"/></td>
    </tr>
    <tr>
    <td><xsl:text>Langtext (Fortsetzung)</xsl:text></td>
    <td><xsl:value-of select="pe:allgemein/pe:legende/pe:langtext_continued/@V"/></td>
    </tr>
    <tr>
    <td><xsl:text>Quittungstext</xsl:text></td>
    <td><xsl:value-of select="pe:allgemein/pe:legende/pe:quittungstext/@V"/></td>
    </tr>
    </table>
    <!-- Anmerkungen-Liste -->
    <h3><xsl:text>Anmerkungen</xsl:text></h3>
    <table border="1">
    <xsl:for-each select="pe:allgemein/pe:anmerkungen_liste/pe:anmerkung">
    <tr>
    <td><xsl:value-of select="@V"/></td>
    </tr>
    </xsl:for-each>
    </table>
    <!-- Leistungsinhalt-->
    <h3><xsl:text>Leistungsinhalt</xsl:text></h3>
    <table border="1" >
    <tr>
    <th><xsl:text>Komplex</xsl:text></th>
    <th><xsl:text>Leistung</xsl:text></th>
    </tr>
    <xsl:for-each select="pe:allgemein/pe:leistungsinhalt/pe:komplex">
    <tr>
    <td><xsl:value-of select="@V"/></td>
    <td>
    <xsl:for-each select="pe:leistung">
    <xsl:value-of select="@V"/>
    </xsl:for-each>
    </td>
    </tr>
    </xsl:for-each>
    </table>
    <!-- Bewertungsliste -->
    <h3><xsl:text>Bewertungen</xsl:text></h3>
    <table border="1">
    <tr>
    <th><xsl:text>Bewertung</xsl:text></th>
    <th><xsl:text>Einheit</xsl:text></th>
    <th><xsl:text>Gebührenordnung</xsl:text></th>
    <th><xsl:text>Leistungserbringerart</xsl:text></th>
    <th><xsl:text>Leistungstyp</xsl:text></th>
    <th><xsl:text>Versorgungsgebiet</xsl:text></th>
    </tr>
    <xsl:for-each select="pe:allgemein/pe:bewertung_liste/pe:bewertung">
    <tr>
    <td><xsl:value-of select="@V"/></td>
    <td><xsl:value-of select="@U"/></td>
    <td><xsl:value-of select="pe:gebuehrenordnung/@V"/></td>
    <td><xsl:value-of select="pe:leistungserbringerart/@V"/></td>
    <td><xsl:value-of select="pe:leistung_typ/@V"/></td>
    <td><xsl:value-of select="pe:versorgungsgebiet/@V"/></td>
    </tr>
    </xsl:for-each>
    </table>
    <!-- Zeitbedarfliste -->
    <h3><xsl:text>Zeitbedarfliste</xsl:text></h3>
    <table border="1">
    <tr>
    <th><xsl:text>Zeit</xsl:text></th>
    <th><xsl:text>Einheit</xsl:text></th>
    <th><xsl:text>Leistungstyp</xsl:text></th>
    </tr>
    <xsl:for-each select="pe:allgemein/pe:zeitbedarf_liste/pe:zeit">
    <tr>
    <td><xsl:value-of select="@V"/></td>
    <td><xsl:value-of select="@U"/></td>
    <td><xsl:value-of select="pe:leistung_typ/@V"/></td>
    </tr>
    </xsl:for-each>
    </table>
    <!-- Prüfzeit -->
    <h3><xsl:text>Prüfzeit</xsl:text></h3>
    <table border="1">
    <tr>
    <th><xsl:text>Zeitangabe</xsl:text></th>
    <th><xsl:text>Zeiteinheit</xsl:text></th>
    <th><xsl:text>Profiltyp</xsl:text></th>
    </tr>
    <tr>
    <td><xsl:value-of select="pe:allgemein/pe:pruefzeit/@V"/></td>
    <td><xsl:value-of select="pe:allgemein/pe:pruefzeit/@U"/></td>
    <td><xsl:value-of select="pe:allgemein/pe:pruefzeit/pe:zeitprofilart/@V"/></td>
    </tr>
    </table>
    <!-- RLV -->
    <h3><xsl:text>RLV</xsl:text></h3>
    <table border="1">
    <tr>
    <th><xsl:text>Kennzeichen</xsl:text></th>
    </tr>
    <tr>
    <td><xsl:value-of select="pe:allgemein/pe:rlv/@V"/></td>
    </tr>
    </table>
    <!-- Leistungsgruppe -->
    <h3><xsl:text>Leistungsgruppe</xsl:text></h3>
    <table border="1">
    <tr>
    <th><xsl:text>Code</xsl:text></th>
    </tr>
    <tr>
    <td><xsl:value-of select="pe:allgemein/pe:leistungsgruppe/@V"/></td>
    </tr>
    </table>
    <!-- Fachgruppen-Liste -->
    <h3><xsl:text>Fachgruppen</xsl:text></h3>
    <table border="1">
    <tr>
    <th><xsl:text>Versorgungsbereich</xsl:text></th>
    <th><xsl:text>Fachgruppe</xsl:text></th>
    </tr>
    <xsl:for-each select="pe:bedingung/pe:fachgruppe_liste/pe:versorgungsbereich">
    <tr>
    <td><xsl:value-of select="@V"/></td>
    <td>
    <xsl:for-each select="pe:fachgruppe">
    <xsl:value-of select="@V"/>
    </xsl:for-each>
    </td>
    </tr>
    </xsl:for-each>
    </table>
    <!-- Ausschlußiste -->
    <h3><xsl:text>Ausschlußliste</xsl:text></h3>
    <table border="1" >
    <tr>
    <th><xsl:text>Bezugsraum</xsl:text></th>
    <th><xsl:text>Ziffer</xsl:text></th>
    </tr>
    <xsl:for-each select="pe:regel/pe:ausschluss_liste/pe:bezugsraum">
    <tr>
    <td><xsl:value-of select="@U"/></td>
    <td>
    <xsl:for-each select="pe:gnr_liste/pe:gnr">
    <xsl:value-of select="@V"/>
    </xsl:for-each>
    </td>
    </tr>
    </xsl:for-each>
    </table>
    </body>
    </html>
    </xsl:template>
    </xsl:stylesheet>
    (3) XSQL output without stylesheet
    -<page>
    −<ROWSET>
    −<ROW num="1">
    <ZIFFER>01700V</ZIFFER>
    −<KAP_BEZ>
    Gesundheits- und Früherkennungsuntersuchungen, Mutterschaftsvorsorge, Empfängnisregelun g und Schwangerschaftsabbruch (vormals Sonstige Hilfen)
    </KAP_BEZ>
    <BEREICH>Arztgruppenübergreifende allgemeine Leistungen</BEREICH>
    <KAPITEL>Allgemeine Leistungen</KAPITEL>
    −<ABSCHNITT>
    Gesundheits- und Früherkennungsuntersuchungen, Mutterschaftsvorsorge, Empfängnisregel ung und Schwangerschaftsabbruch (vormals Sonstige Hilfen)
    </ABSCHNITT>
    −<KURZTEXT>
    Grundpauschale für Fachärzte für Laboratoriumsmedizin u.a.
    </KURZTEXT>
    −<LANGTEXT>
    Grundpauschale für Fachärzte für Laboratoriumsmedizin, Mikrobiologie und Infektionsepidemiologi e, Transfusionsmedizin und ermächtigte Fachwissenschaftler der Medizin für die Erbringung von Laborleistungen gemäß den Richtlinien des Gemeinsamen Bundesauss
    </LANGTEXT>
    −<QUITTUNGSTEXT>
    Grundpauschale für Fachärzte für Laboratoriumsmedizin u.a.
    </QUITTUNGSTEXT>
    </ROW>
    </ROWSET>
    </page>
    Please apologize that the stylesheet has considerably more than the XSQL query--this is going to be extended when the technique works.
    Thank you, kind regards
    Miklos HERBOLY

    Perhaps you could consider using the XMLType instead of varchar2 for the db columns, thus avoiding use of XMLTABLE() altogether.
    Consult for example the source code of :
    http://www.amazon.com/Oracle-XSQL-Combining-Publish-Dynamic/dp/0471271209
    You might also try posting to a more specialized forum such as:
    http://forums.oracle.com/forums/category.jspa?categoryID=51
    NA
    http://nickaiva.blogspot.com
    Edited by: Nick Aiva on Jan 21, 2011 9:17 PM

  • XSQL and MS Access

    I am attempting to connect to an Access database using XSQL. I believe I have everything set correctly.
    <connection name="test">
         <username>test</username>
         <password>test</password>
         <dburl>jdbc:odbc:mytest
    </dburl>
                   <driver>sun.jdbc.odbc.JdbcOdbcDriver</driver>
         <autocommit>true</autocommit>
    </connection>
    <xsql:query connection="protech" xmlns:xsql="urn:oracle-xsql">
    SELECT * FROM tblTest
    </xsql:query>
    However, I get a resulting,
    <<Oracle XSQL Servlet Page Processor 1.0.4.3 (Production)
    <<XSQL-007: Cannot acquire a database connection to <<process page.
    <<[Microsoft][ODBC Driver Manager] Data source name not <<found and no default driver specified
    The message is a little confusing because it says there is no dataset with that name and there is not driver. I know there is an odbc-connection setup on the machine with the name "mytest". As for the driver. Do I need to set it in my classpath somewhere? If so where? In Catalina.bat?

    Kevin,
    Assuming I have an ODBC datasource on my local machine called ecdcmusic, the following works for me:
    <connection name="test-access">
    <username>admin</username>
    <password></password>
    <dburl>jdbc:odbc:ecdcmusic</dburl>
    <driver>sun.jdbc.odbc.JdbcOdbcDriver</driver>
    <autocommit>true</autocommit>
    </connection>
    Good Luck,
    Charlie

Maybe you are looking for

  • Ho to Create Differential Excise Invoice

    Dear Friends, Please tell me how to create differential excise invoice. Process:  At the time of STO the material price is Rs 100, but when we are selling the material from our depot there is a price hike so it became 120.  So for the difference of R

  • I'm not allowed access to my own files...

    Hello all, Just talked to an Adobe person on the Chat, but he couldn't help me, he told me to get someone on the phone... on the phone, they told me they couldn't help me because my product was too old... they told me to come here and ask for help...

  • E-Rec registration page

    HI experts, We are are not able to register the external candidate? when I click register nothing happens. I have seen couple of threads but no luck. we are in ehp4 Danny

  • Special Characters in Create Table......

    How can I use & sign in the column name in Create Table Statement: Create Table (aa&bb varchar2(10));

  • Patchset 10.2.0.5 (required for Windows 7 64-bit)

    Am I right in thinking this isn't freely available - only access route I can find mentioned seems to be via some sort of support contract. Anyone know why Oracle is restricting access to this when 11 is available?