How to keep decimal in sql query

Dear Expert,
I try to do calculation in sql query, but it will automatically remove the decimal point.
This is my query:
SELECT 719 / 100
And i want a result = 7.19, but its not work. Its return 7.
i did try to use, SELECT ROUND(719/100,2), but its not working too...
Does any one have any idea how to get 7.19
Thanks in advance for any reply.
Regards,
Mat

yes, i have answer already.
select cast(719/(100*1.0)as decimal (16,2))

Similar Messages

  • How to compare result from sql query with data writen in html input tag?

    how to compare result
    from sql query with data
    writen in html input tag?
    I need to compare
    user and password in html form
    with all user and password in database
    how to do this?
    or put the resulr from sql query
    in array
    please help me?

    Hi dejani
    first get the user name and password enter by the user
    using
    String sUsername=request.getParameter("name of the textfield");
    String sPassword=request.getParameter("name of the textfield");
    after executeQuery() statement
    int exist=0;
    while(rs.next())
    String sUserId= rs.getString("username");
    String sPass_wd= rs.getString("password");
    if(sUserId.equals(sUsername) && sPass_wd.equals(sPassword))
    exist=1;
    if(exist==1)
    out.println("user exist");
    else
    out.println("not exist");

  • Re: How to converting from PL/SQL query to T-SQL query

    How to converting from PL/SQL query to T-SQL query... Its Urgent

    Download the
    SQL Server Migration Assistant for Oracle.  It will convert whole Oracle databases, or single queries or PL/SQL stored procedures.
    With caution that If your database is using Collation which is case sensitive SSMA will not work.SSMA doesnt guarantees 100% for conversion of Queries/stored proc /database if it fails to do so for some queries you will have to do it manually.
    But you can try
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • How to set fetchsize of sql Query when using Database Adapter.

    Hi All,
    I am using DatabaseAdapter to connect to database and retriving huge amount of data.For improvement in the performance I want to set the "fetchsize" of sql query. I know fetchsize can be preset in Java using Jdbc 2.0 API.Please let me know how to set this value in BPEL when using DBAdapter?
    Thanks
    Chandra

    I talked to the developer of the db adapter - and he told me this feature will be available in BPEL PM 10.1.3 (which is supposed to be production later this year, and a public beta soon). If this is an emergency I would recommend going throug Oracle support and have them file an enhancement for 10.1.2.0.2
    hth clemens

  • How to use property file - sql query define in property file

    Hi All,
    Anybody please tell me how to use property file.
    I have placed sql query in propery file and I have to access this in my file.
    well so far this is my code but don't know how to implement in the following ...
    pstmt = con.prepareStatement("select * from registration where username=?");
    instead of writting the query I want to use the property file.
    so far I have developed the following code...
    FileInputStream fis = new FileInputStream("querysql.property");
    Properties dbProp = new Properties();
    dbProp.load(fis);is the code correct... or is there another way to access property file
    Please help.
    please reply soon....
    Thanks

    Before answering, check if it's already been done here http://www.jguru.com/forums/view.jsp?EID=1304182

  • Visual Web - How to 'setObject' for an SQL query with an IN  ? clause

    Hello, I am relatively new to visual web pack. I am stuck at writing the java code for passing parameters to the SQL query. In a normal scenario, where we need to check if some variable is present in a column (= ?), we would pass the parameter as :
    setObject(1, whatevervalue);
    How do we pass parameters if we need to check for more than one variable? The query editor in VWP has the option IN, which allows us to check for more than one match in a column. The IN clause is supposed to allow the format ('ex1', 'ex2' ...). I tried using an array as a parameter, like, setObject(1, somearray). It gives me a null exception. I even tried sending a variable in ('ex1', 'ex2' ...) format; doesn't like it either.
    Any help is greatly appreciated.

    Check the following docs:
    http://www.netbeans.org/kb/60/web/databoundcomponents.html
    http://www.netbeans.org/kb/60/web/inserts-updates-deletes.html
    See also:
    http://developers.sun.com/jscreator/reference/techart/2/query-editor.html

  • How to aggregate data in SQL Query

    Hi,
    I have Table1 field1 and field2. Combination of these fields form the key of this table.
    Next I have Table2 with field3 and field4. field1 is the unique key for this table.
    My query is:
    select T2.field4||','||T1.field2 from T1 inner join T2 on T1.field1 = T2.field3;
    In the result I want to aggregate the data by T2.field4
    How do I that? Please help
    Thanks in advance,
    Raja

    How to aggregate data in SQL Query By using aggregate functions and group by:
    SQL> select object_type, count(*), sum(decode(status,'VALID',0,1)) inv_obs
      2  from all_objects
      3  group by object_type;
    OBJECT_TYPE                     COUNT(*)              INV_OBS
    CONSUMER GROUP                         2                    0
    INDEX PARTITION                      970                    0
    TABLE SUBPARTITION                    14                    0
    SEQUENCE                             226                    0
    SCHEDULE                               1                    0
    TABLE PARTITION                      349                    0
    PROCEDURE                             21                    0
    OPERATOR                              57                    0
    WINDOW                                 2                    0
    PACKAGE                              313                    0
    PACKAGE BODY                          13                    0
    LIBRARY                               12                    0
    PROGRAM                                9                    0
    INDEX SUBPARTITION                   406                    0
    LOB                                    1                    0
    JAVA RESOURCE                        771                    0
    XML SCHEMA                            24                    0
    JOB CLASS                              1                    0
    TRIGGER                                1                    0
    TABLE                               2880                    0
    INDEX                               4102                    0
    SYNONYM                            20755                  140
    VIEW                                3807                   72
    FUNCTION                             226                    0
    WINDOW GROUP                           1                    0
    JAVA CLASS                         16393                    0
    INDEXTYPE                             10                    0
    CLUSTER                               10                    0
    TYPE                                1246                    0
    EVALUATION CONTEXT                     1                    0

  • How i can execute the sql query in java code

    I already have sql query in jave plateform i need to execute this code how i can do that. i have unix env and with oracle database. should i just run this query in my sqlplus. this file has extention .java. thanks

    you can create a project in JDeveloper add the java file to it, add the Oracle JDBC library to the project properties and then hit the run button.

  • How to numberformat when using sql:query alogn with c:forEach JSTL tags

    Is there anyway to format the numeric values returned from the database when using <sql:query> alogn with <c:forEach> tags
    Here is my jsp code
    <sql:query..../>
    <c:forEach var="row" items="${queryResults.rows}">
    <tr>
    <td><c:out value="${row.COL1}" /></td>
    <td><c:out value="${row.COL2}" /></td>
    </tr>
    </c:forEach>
    Col1 values are numeric without any formats Eg: 1000, 10000, 1000000 etc.
    how can i format them to 1,000 , 10,1000 , 100,000 etc

    It is polite to mention what your answer was. These posts are not just here for you to ask questions, but to be used as a resource for other people to find answers. Saying "I solved it" with no details helps noone.
    I presume you discovered the JSTL <fmt:formatNumber> tag?

  • How to find the backend  SQL query of the JSP page in OIC

    Does anybody how the best way to find the backend SQL QUERY of OIV JSP page?

    How To Generate Trace Files in in HTML/JSP (using Profile Option)
    •     • Note: This requires proper responsibility to set SQL Initialization statement using Profile option.      
         Step 1.     Login to the desired Form application.     
         Step 2.     Select +Profile >> System ('Find System Profile Values' screen will pop up)     
         Step 3.     Check 'User' and Type in the Username (in which the account for that user will be trace)     
         Step 4.     Type 'Initialization%' in the Profile box and Hit 'Find' (Click here for preview.)     
         Step 5.     In the User box, type the following statement and Hit 'Save' (Click here for preview)
         BEGIN FND_CTL.FND_SESS_CTL('','','TRUE','TRUE','','ALTER SESSION SET TRACEFILE_IDENTIFIER = TESTING MAX_DUMP_FILE_SIZE = 5000000 EVENTS ='||''''||' 10046 TRACE NAME CONTEXT FOREVER, LEVEL 12'||'''');END;     
         Note:     specify any name you like to identify your trace, in this case, testing is the end name on the trace. You can also specify the amount of data allowable to be in the trace, in this case, 5000000 is the amount set. Make sure you hit 'Save' afterwards.[Quotes in the statement are all 'Single' quotes.]
              specifying TRACEFILE_IDENTIFIER value is mandatory when setting up the trace using the above profile option value
         Step 6.     Login to HTML / JSP page with username/password and start your flow. (Everything you do once login to HTML / JSP will get trace.)     
         Step 7.     Logout of HTML / JSP application once you completed with your flow.      
         Step 8.     Go back to the Profile option in the Form application and delete the Initialization SQL statement, and Hit 'Save'.     
         Step 9.     Log in to the database server or login server and retrieve your trace file.
         Identify and retrieve the trace file using the tracefile_identifier specified in Step 5.
         In this case the tracefile_identifier is “TESTING”. (Click here for Trace file locations) *     
         Note:     If you need to regenerate your trace or tracing a new flow, then repeat Step 1 to Step 8. To avoid self-confusion, choose a different name for your trace identifier everytime you set to trace.     
         Step 10.     See TKPROF section on how to format trace file into readable text.
         Trace Options Definition
         No Trace          Tracing is not activated
         Activities will not get traced.
         Regular Trace
         (Level 1)          Contains SQL, execution statistics, and execution plan.
         Provides execution path, row counts as well as produces smallest flat file.
         Trace with Binds
         (Level 4)          Regular Trace plus value supplied to SQL statement via local variables.
         Trace with Waits
         (Level 8)          Regular Trace plus database operation timings that the SQL waited to have done in order to complete, i.e. disk access.
         Trace with Binds and Waits
         (Level 12)          Regular trace with both waits and binds information.
         Contains the most complete information and will produce the largest trace file.
    ****Send me an email to [email protected],I will share the document with you.

  • How to fetch the executed sql query in publisher

    hi.. like in obiee from manage session we can fetch the sql query similarly how can we fetch the query in BI publisher

    This may help you:
    http://gerardnico.com/wiki/bip/log
    Cheers
    Nico

  • How to calculate IO on SQL Query.

    Hi all,
    Could u please tell me how to calculate IO for specific SQL Query.
    Regards,
    Santosh.

    In what context you are looking the IO consumed for the query? One option you have got is Autotrace,another can be tracing the query and formatting the results using Tkprof.
    Aman....

  • How to backup database using sql query?

    Hello,i'm student, i'm researching oracle database,i want to backup database that using sql query (like backup query in SQL SERVER) ,how to do that ??
    Thank!

    No, database backups cannot be done from within the database.
    Commands for backups are outside of the database.
    See the "2 Day DBA Guide" http://download.oracle.com/docs/cd/E11882_01/server.112/e10897/toc.htm
    and the "Backup and Recovery Users's (actually Adminsitrator's) Guide : http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/toc.htm
    Hemant K Chitale

  • How to notify in case SQL query(JDBC sender adapter) does not fetch records

    hi,
    How can we notify(by alerts or something) in case SQL query(JDBC sender adapter) does not fetch records? In channels logs it only says processing started & finished(no message is created for same).
    Thanks,
    Mayank

    Hi,
    1 ) What is exact audit log message ?
    2) Try fetching the count in SQL statement  if there are any valid records it will give the count.
        May for testing you can use <TEST> in update statement.
    3) Have you used taskTimeout parameter ?
    4) Are multiple channels polling on same table ?
    regards
    Ganga

  • MultiProvider: How to decipher the underlying SQL query

    Hello Guys,
    I have joined 2 cubes using MultiProvider. I created a query which takes Key Figure values from both cubes. When I go to "Display SQl Query", I see 2 separare queries for each cube separately. I don't see a join between them.
    If I have to write the same query directly in ABAP, then how should I go about it?
    Also any idea what does the statement below means..I see this in every MultiProvider query
    STAR_TRANSFORMATION FACT( &TABLE& ) &SUBSTITUTE LITERALS&

    Hello:
    - You could never write a BI query in ABAP - that is not a real possibility, don't bother trying this, it's not reasonable (sorry).
    - MultiProvider is a Union operation, not a Join.  Queries against to a MultiProvider are split into sub-queries, where joins are performed on the tables of a cube, then the subqueries are merged in a Union operation.
    - You can see more information about the SQL in RSRT (including a MultiProvider explain)
    - STAR_TRANSFORMATION is a feature of the Oracle RDBMS, where the optimizer recognizes that the join operation against the tables in a star schema (InfoCube) can be more efficiently performed using a special technique, as opposed to ordinary join operations (like you might see in an OLTP system).  The optimizer automatically uses STAR_TRANSFORMATION to ensure that efficient joins are executed.
    Thanks for any points you choose to assign (the way of saying thanks in SDN).
    Best Regards -
    Ron Silberstein
    SAP

Maybe you are looking for

  • Ipod classic isn't recongnized in Windows or itunes

    I have an ipod 160gb classic. It was working fine a few weeks ago but after updating to the latest itunes, it's stopped working. It isn't recognized on my computer (I'm running Windows Vista) or in itunes at all. My USB ports and the cables I have be

  • CCME Call Forward from one Hunt Group to another Hunt Group Failure

    Hi I have a couple of hungroups in Cisco Call Manager Express. I am trying to configure a Call Forward no answer from one hunt group to another. Does anybody know if this is possible? If so, is there a config available? Here is my config, but it is n

  • Possible to downgrade to Safari 1.2 on OSX 10.4?

    If possible, I need to downgrade or install Safari 1.2 on a Tiger-equipped iBook in order to troubleshoot an Internet Banking problem. The vendor for this software only lists Safari 1.2 as a supported browser, so I need to reproduce the issue on that

  • Unable to grant_permission java.lang.RuntimePermission

    Hello, i am trying to use a java class within SQL plus. My class has been uploaded successfully, but when executing the method within the class i get this error: Internal exception: java.security.AccessControlException: the Permission (java.lang.Runt

  • Safari: How to follow a link that looks like a phone number?

    When I try to log in to GrandCentral Mobile, it presents me with my phone number as a link after the log in page. If I touch the link to confirm and follow it, the iPhone recognizes the number format and offers to dial it for me. If I hit "cancel" it