How to use I18N in Oracle's queries

Hi guys. I want to know how I can internationalize the date conversion in my SQL queries, stored procs, and triggers (from here known as queries) in Oracle. Currently, what we do to convert chars to dates is "to_date('mm/dd/yyyy', dateParam)'. This have been working fine until recently when we decided to internationalize our app that the "dateParam" we passed to the queries does not necessarily follow the "mm/dd/yyyy" format anymore.
Any help would be greatly appreciated. Thanks.

You should be using PreparedStatements and bind variables and then there would be no problem.
If not your database only supports a single time format.
So your java code must convert to that format first before calling the SQL. You can use SimpleDateFormat and specify the TimeZone when you call it.

Similar Messages

  • How to use a Web Template with queries from multiple BW Systems?

    Hi all,
    can anybody help me how to use a Web Template with queries (DATA PROVIDER)in it from multiple BW Systems?
    Thanks in advance, best regards
    Frank

    Great! Thanks for the quick response.
    Have you tried this for XMLA datasources created within the EP system also?
    i.e use Web Analyzer to create a view from the XMLA source and use that view within WAD?
    Thanks.

  • How to use SQL functions in the queries

    hey guys i wanna know how to use SQL functions in the queries is it possible or not .

    Hi,
    Wat exactly that set values are?
    those from sql query?
    How to use count():
    The COUNT() function returns the number of rows that matches a specified criteria.
    SQL COUNT(column_name) Syntax
    The COUNT(column_name) function returns the number of values (NULL values will not be counted) of the specified column:
    SELECT COUNT(column_name) FROM table_name
    SQL COUNT(*) Syntax
    The COUNT(*) function returns the number of records in a table:
    SELECT COUNT(*) FROM table_name
    SQL COUNT(DISTINCT column_name) Syntax
    The COUNT(DISTINCT column_name) function returns the number of distinct values of the specified column:
    SELECT COUNT(DISTINCT column_name) FROM table_name
    The IN function helps reduce the need to use multiple OR conditions.
    The syntax for the IN function is:
    SELECT columns
    FROM tables
    WHERE column1 in (value1, value2, .... value_n);

  • How to use css in oracle forms

    Hello,       I am using oracle forms 11g with weblogic server 10.3.5 at windows 7.I have to use CSS in oracle forms.i have tried to search it but no profit.please some one else tell me that how can use css in oracle forms. Thnak You regards aaditya

    Hi
    As Francois pointed out Oracle forms has nothing to do with html based technology. The way you can get the equivalent effect of creating consistancy in the way your objects are displayed is by creating a set of items you want and alter their apperance and behaviour and place them into object libraries (one library should do the trick).  From there you subclass all of you forms items off these libraries.
    Regards
    Quintin

  • How to use iframes in oracle 10g

    I have to load two jsp pages in a single html . I have done that thru iframes. But i have to dynamically load the second jsp page in the frame 2 , when the user clicks upon certain details in the frame 1 jsp page. I have wriiten the code of document.iframe in format trigger attribute. It doesn't work. Is there any other way to achieve this. I want to load the frame 2 jsp page dynamically , according to the input i get from frame 1 jsp page.

    Hi,
    >>Anybody know how to use profiler in oracle 10g
    What do you mean "profiler". About Resource Limits/Create Profiles ?
    >>i couldn't able to install the enterprise manager console.
    What OS ?
    >>because i need to trace the execution of a stored procedure.waiting the reply.
    Debug ? You can use SQL Developer, TOAD, PLSQL Developer for this purpose.
    Cheers

  • How to Use Profiler in ORACLE 10g

    Hi all,
    Anybody know how to use profiler in oracle 10g and also i couldn't able to install the enterprise manager console.is there any tools available for that.because i need to trace the execution of a stored procedure.waiting the reply.
    Sathish

    Hi,
    >>Anybody know how to use profiler in oracle 10g
    What do you mean "profiler". About Resource Limits/Create Profiles ?
    >>i couldn't able to install the enterprise manager console.
    What OS ?
    >>because i need to trace the execution of a stored procedure.waiting the reply.
    Debug ? You can use SQL Developer, TOAD, PLSQL Developer for this purpose.
    Cheers

  • How to use parameters in oracle SQL script????

    Right now I am writing a SQL script to create a schema and build the objects of this schema....
    I use a .net winform program to run sqlplus to parse this sql script ...
    The problem is that the schema name and the tablespace's location and the sys password must be input by the user, so my SQL script should use these runtime input parameters instead of const parameters....
    So, how to use parameter in SQL script ...........
    Are there some example scripts in oracle home directory for me to refer to????

    Hi,
    UNISTD wrote:
    thanks .....
    what's the difference between variable , define, accept in sqlplus ???VARIABLE declares (but does not assign a value to) a bind variable. Unlike substitution variables, bind variables are passed to the back end to be compiled, and they can only be values in certain data types. You can not use a bind vaiable in place of an identifier, so to do something like
    CREATE USER  &1 ...a bind variable won't work.
    "DEFINE x = y" sets the substitution variable &x to have the value y. There is no user interaction (unless x or y happen to contain undefined substtiution variables).
    "DEFINE x" shiows the value of the substitution variable &x, or, if it is undefined, raises a SQL*Plus error. I use this feature below.
    ACCEPT sets a substitution variable with user interaction.
    And if the user miss some parameters in “sqlplus /nolog ssss.sql par1 par2 par5 par6”, how to use default value of the miss parameters??Don't you need a @ befiore the script name, e.g.
    sqlplus /nolog @ssss.sql par1 par2 par5 par6Sorry, I don't know of any good way to use default values.
    The foloowing works, but, as you can see, it's ugly.
    "DEFINE 1" display a message like
    DEFINE 1            = "par1" (CHAR)if &1 is defined; otherwise,it will display a SQL*Plus error message like
    SP2-035: symbol 1 is UNDEFINEDNotice that the former contains an '=' sign, but the latter does not.
    The best way I know to use default values is to run the DEFINE command, save the output to a filee, read the file, and see if it's an error message or not.
    So you can use a script like this:
    --     This is  DEFINE_DEFAULT.SQL
    SPOOL     got_define_txt.sql
    DEFINE     &dd_old
    SPOOL     OFF
    COLUMN     dd_new_col     NEW_VALUE     &dd_new
    WITH     got_define_txt     AS
         SELECT  q'[
              @got_define_txt
    ]'               AS define_txt
         FROM    dual
    SELECT     CASE
             WHEN  define_txt LIKE '%=%'
             THEN  REGEXP_REPLACE ( define_txt
                               , '.+"
    ([^"]*)
                         , '\1'
             ELSE  '&dd_default'
         END        AS dd_new_col
    FROM     got_define_txt
    {code}
    and start your real script, ssss.sql, something like this:
    {code}
    DEFINE          dd_new     = sv1
    DEFINE          dd_old     = 1
    DEFINE          dd_default     = FOO
    @DEFINE_DEFAULT
    DEFINE          dd_new     = sv2
    DEFINE          dd_old     = 2
    DEFINE          dd_default     = "Testing spaces in value"
    @DEFINE_DEFAULT
    {code}
    when this finishes running, the substitution variable &sv1 will either have the value you passed in &1 or, if you didn't pass anything, the default value you specified, that is FOO.
    Likewise, &sw2 will have the value you passed, or, if you didn't pass anything, the 23-character string 'Testing spaces in value'.
    Here's how it works:
    Define_default.sql puts the output of the "DEFINE x" command into a column, define_txt, in a query.  That query displays either the existing value of the substitution variable indicated by &dd_old or, if it is undefined, the default value you want to use, which is stored in the substitution variable &dd_default.  The substitution variable named in &dd_new is always set to something, but that something may be its existing value.
    Notice that the paramerters to define_default.sql must be passed as global varibales.
    Why didn't I just use arguments, so that we could simply say:
    {code}
    @DEFINE_DEFAULT  sv1  1  FOO
    {code}
    ?  Because that would set the substitution variables &1, &2 and &3, which are miost likely the very ones in which you're interested.
    I repeat: there must be a better way, but I'm sorry, I don't know what it is.
    I usually don't do the method above.  Instead, I always pass the required number of parameters, but I pass dummy or plce-holder values.
    For example, if I wanted to call ssss.sql, but use defulat vlaues for &1 and &3, then I would say something like:
    {code}
    @ssss  ?  par2  ?
    {code}
    and, inside ssss.sql, test to see if the values are the place holder '?', and, if so, replace them with some real default value.  The use has  to remember what the special place holder-value is, but does not need to know anything more, and only ssss.sql itself needs to change if the default values change.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to use help in oracle 10g XE

    Hello,
    I just wanted to know how to use help in sql command line in oracle 10g XE
    regards,
    Sreekanth.

    Hi thankyou very much for the answer, that web-page is very good but....
    I was hoping for answer that would walk me through the help command used in the SQL PLUS like: "help create"
    after i have read few manuals i came to know we can use @hlpbld.sql for building help tables it asks me for entering value 1 and 2, after that it exits the prompt and when i re-login i dont see "help command" working...
    any comments ot procedure to do this...

  • How to use dynamic select query which queries from 3 different table.

    Hi All,
    I am new to Toplink, i would like to use a named query to select some of the columns from 3 different tables with dynamic where clause.
    I have used the following lines. Please tell me how to get code for the dynamic where clause.
    First try :
    Vector objPersons = (Vector)session.executeQuery("findPersonByGlobalID",Person.class,vQueryArguments);
    The above method is not returning the vector or collection.
    Second Try:
    ReadAllQuery query = new ReadAllQuery(Person.class);
    query.useCollectionClass(LinkedList.class);
    LinkedList person = (LinkedList) session.executeQuery(query);
    The second try is returning the collection but, this fetches all the record from the table.
    1. How to query for range of records?
    2. How to query from multiple tables for some range. How to use dynamic range values ?
    Please reply with your answers or some pointers would help.
    Thanks and Regards,
    Vijay.B

    Hi,
    Did you try using a SQLCall ? It might be able to satisfy you requirements .. :-
    Employee employee = (Employee) session.executeSelectingCall(
        new SQLCall("SELECT * FROM EMPLOYEE WHERE EMP_ID = 44")
    );You can get more information here :-
    http://www.oracle.com/technology/products/ias/toplink/doc/1013/MAIN/_html/qrybas004.htm
    Regards,
    Sandeep

  • How to use a non-Oracle database?

    Oracle Lite is used as the database per default. Technical
    notes describe how to use Oracle 9i. I'm more interested in using more light-weight RDBMSes like HSQLDB for example. It is been said that Oracle BPEL supports Oracle, Oracle Lite, DB2, SQL Server and Pointbase. Now how to configure Oracle BPEL to use each of the non-Oracle datbases listed above?

    I've managed to setup the PM to use Pointbase rather than the default Oracle Lite. Along the way, several questions came up:
    1. Since the directory system\database\scripts already provides DDL scripts for Pointbase, creating the tables of a Pointbase database was easy. However, I wonder why you don't support HSQL. After all, OC4J supports HSQL data sources (see database-schemas\hypersonic.xml). Are there any features required by Oracle BPEL that are not provided by HSQL? If not, can we just use the Pointbase DDL scripts for HSQL?
    2. Editing the data-sources.xml file also wasn't a big deal although templates for Pointbase were missing. BTW, my XML editor reports the data-sources.xml file to be invalid: "Document cannot be stand-alone because default-value attribute 'connection-retry-interval' is not explicitly assigned.
    3. The changes in StartOraBPEL.bat were:
    - Comment out running kill_olite.bat and start_olite.bat
    - Start the Pointbase server (rather than Oracle Lite)
    4. The needed changes in obsetenv.bat were not that obvious: It was required to add the Pointbase libs to the BOOT_LIB classpath. Otherwise the Pointbase driver cannot be loaded. To be on the safe side, I've also added the Pointbase libs to the MY_CLASSPATH classpath but I'm not sure if that is really required. Is it?
    5. Finally, it would be good if shutting down the Pointbase server could be done in a similar fashion as that is configured for Oracle Lite. Apparently, some sort of hooking is used. Now how to setup a shutdown hook for a Pointbase server?

  • How to use ed in oracle 11g as we do in 10g

    Hi,
    Anyone can u tell me how to use text editor in oracle 11g as
    we do in 10g.
    thanks
    srinivas

    Well, that would be because notepad doesn't exist on *nix - isn't that obvious?                                                                                                                                                                                   

  • Where to find and how to use JDAPI with oracle forms

    Hi All
    I want to use JDAPI for oracle forms, plz can any one suggest that where i can find the required jar for JDAPI, provide me if any links r there for downloading JDAPI.
    Thanks in Advance

    Hi Torsten Kleiber
    I am interested in changing forms buttons in our existing forms .I was trying to find if it was possible.Going thru your post I realised it is possible to change properties in existing forms .
    i have specific questions with JDAPI will i be able to change my buttons in a form to Iconic buttons.
    Could you kindly send me the code of your class in the abovementioned post (I have created a simple class to modify some forms properties.)
    I would like to have alook at it i am a Novice in java but looking at your source code may be able to give myself a head start .(I am well versed pl/sql forms and reports NO JAVA idea)
    Two while trying out the oracle demo to create a form by jdapi I was able to create a class and was unable to execute it .What do i need to install to execute it. I have forms 10 installtion with Jinitiator 1.3 installed
    DO i need to install Jdeveloper or JDK i think either of this is required. I shall be highly be obliged if u can clear my queries or any one else in the forum may wish to add to 2cents to my infinetly minimal knowledge of java

  • How to use I18N with a custom validator?

    This is my custom validator:
        public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException
            Pattern pat=Pattern.compile(".+@.+\\.[a-z]+");
            Matcher m= pat.matcher(value.toString());
            if(!m.find())
                FacesMessage message = new FacesMessage("Not a valid e-mail address");
                throw new ValidatorException(message);
        }Instead of providing the text "Not a valid e-mai address", I'd like to get the text out of my ApplicationResources property file.
    How can I do this?
    I know how to use it with the provided validators, but not with own custom ones
    Please help me out, thanks

    I found a solution for this problem, I don't know it's best practice but here it is :
        public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException
            String errortext;
            Pattern pat=Pattern.compile(".+@.+\\.[a-z]+");
            Matcher m= pat.matcher(value.toString());
            if(!m.find())
                ResourceBundle bundle =
                ResourceBundle.getBundle("be.vdab.resources.ApplicationResources", context.getViewRoot().getLocale());
                errortext = bundle.getString("erroremail");
                FacesMessage message = new FacesMessage(errortext);
                throw new ValidatorException(message);
        }

  • How to use EBU in oracle 7.3.4

    I want to use ebu to create the catalog database and target
    database.I have use rman in oracle8.1.7 successfully.But I don't
    know the procedure for ebu .If you know how to use the ebu
    please let me know .Thanks.
    Best regards.

    Touch and hold the App until the apps wiggle and show an X in the upper left corner of the App.
    Click the X to delete it from your device.
    Not all Apps can be deleted.
    If they came with the device, you cannot delete them.

  • How to use LDAP with Oracle forms 10g on Oracle application server

    Hi,
    I need some help on this. I have developed oracle forms 10g on application server 9iAS. The client want to use the existing LDAP authentication to the software we wrote. I do not know how I could configure to use the existing LDAP authentication . If anyone know how would I use the existing LDAP on different server to use when they logon to our menu in 10g to validate the user. Do I need to add any varibales in formweb.cfg or any other method. Please help.
    Thanks
    Luksh

    I am not quite sure if this works out of the box. According to an Oracle FAQ:
    4.2 Can I use LDAP to authenticate Forms Services?
    Not directly. However, Oracle Login Server is able to authenticate against a LDAP directory and thus a Forms application can take advantage of this in a SSO environment. But you cannot use access control information stored in a LDAP directory with Forms.

Maybe you are looking for

  • Cannot configure webutil to run client_host command

    I am using WLS 10.3.5 with FMw 11.1.2 (Forms/Reports 11 Release 2), Forms Builder, Windows 7, Chrome browser 1) every thing was working fine, i was creating forms and running them Ok. 2) then, I want to use client_host command but i am unable to (as

  • 5th gen and docks

    Silly question but... I have two ipods, an apple dock and a new universal dock. Both the ipods let out a nice little beep when they are connected to the older style dock, but don't make a sound with the new universal dock. Anyone got any idea as to w

  • DAQ-653X handshaking mode in C

    Hello all, I'm new on this forum, I'm a student working on a PCI-DIO-32HS. I have to work in C with Visual Studio, and to use the handshaking mode. I'm looking for documentation and examples because I'm a little in troubles just with the user manual

  • Hi,how to call reports in bdc

    hi experts, please tell me how to call reports in bdc. nobody give me replay  for this . thank u in advance.

  • Snow Leopard YES or NO

    Hi ALL, Why woul'd I install Snow Leopard on my new iMac Intel Core-2 duo I installed Leopard 10.56 and upgraded to 10.5.8 Give me a good reason to do that. Thanks for the advice ... Dimaxum