PL/SQL :: Round Function Output Depend On 2nd Digit After Decimal Point

Oct 19, 2012

I have a question on Round Function

Round(###.###,1)

Will the round function output depend on 2nd digit after decimal point also or not?

View 6 Replies


ADVERTISEMENT

Fix Number Of Digit After Decimal Point?

Mar 21, 2007

I have a small prob. I want an amount to be always 2 decimal places. I've used the Round function - Round(amount,2). the problem is that if the amount is only to 1 dp like 1.4. the above function will return 1.4. I want it to appear like 1.40

View 2 Replies View Related

SQL & PL/SQL :: Function That Multiply Number When There Is More Than 3 Decimal Point?

Mar 20, 2010

how to create a function that will multiply the number when the number has more than 3 decimal point.

Example.
123.012 - multiply by 10
123.0123 - multiply by 100
123.01234 - miltiply by 1000

Column A is the result of the number being multiplied according to decimal point.
Column B contains the multiplier used in column A.

View 10 Replies View Related

PL/SQL :: Function That Returns The Check Digit Of 9-digit Number

Jan 17, 2013

I would like a pl/sql function that returns the check digit of a 9-digit number?

Look at

[UR]......

For example number 109409714 (9 digits) should do check digit. I want validation of check digit, & want to return the check digit.

View 8 Replies View Related

SQL & PL/SQL :: Selecting Numbers That Has Only 3 Digits After Decimal Point?

Mar 10, 2011

How to write SQL query for selecting all the values (numbers) in the table which has 3 digit after decimal point.

For example say A is the table it has following values

200.24
300.456
123.22
1234.344

From this I need only

300.456
1234.344

View 14 Replies View Related

PL/SQL :: Regular Expression To Check Number With At Least One Decimal Point?

Nov 18, 2013

I would like to use the REGEX_LIKE to check a number with up to two digits and at least one decimal point: Ex.10.11.1112 This is what I have so far.

if regexp_like(v_expr, '^(d{0,2})+(.[0-9]{1})?$') t

View 3 Replies View Related

How To Change Decimal Symbol And Digit Grouping Symbol

Jun 19, 2011

Currently , my system using , as digit grouping symbol and . as decimal symbol in Oracle forms and report. Is there any way to reverse that to the whole system?

View 3 Replies View Related

PL/SQL :: Unable To Round Date Function?

Feb 21, 2013

cant i round the date like this? or only sysdate can be rounded or if the date is stored in a variable can only be rounded

select round('21-feb-1999','mon') from dual;

View 2 Replies View Related

PL/SQL :: Function To Round To Previous Quarter

Feb 28, 2013

I need to have a function which will round to previous quarter

For ex :

if the value is 1.95 it should give 1.75
if the value is 1.60 it should give 1.50

View 2 Replies View Related

SQL & PL/SQL :: Function To Accept 4 Digit Number Which Should Not Be Repeated?

Aug 15, 2012

i nee a function which accepts 4 digit number and in four digit number the number should not be repeated. i want all the number in the output.

ex:1234
2367
1262(is not valid)

View 20 Replies View Related

SQL & PL/SQL :: Data Type To Return Decimal Values In Function

Feb 26, 2013

I have the following database function.

GetRegionDetails(id in varchar2, o_lat out number, o_lon out number);

The problem is, the output values are returning as whole numbers ie. 38.108766567 is being returned as 38 and -78.16423574566 is returned as 78

what data type I should use so that my output is returns all the decimal values?

View 5 Replies View Related

SQL & PL/SQL :: Output Of Oracle Function Dump

Oct 18, 2010

what the following output of the oracle function "dump" means?

query: select dump(:new.messaging_state) from dual

output:

Typ=2 Len=1: 193

I need this debug output because I want to know which value the program wants to write in the columns messaging_state.

The update fails because of a parent Key violation.

View 2 Replies View Related

PL/SQL :: Output Like Using Sql Query Without Using Dense-rank Function?

May 1, 2013

Here table - tac has

row1
-----
X
X
X
B

[code]...

I want ouptut like using sql query with out using dense_rank function,

row1 row2

X 1
X 1
X 1
B 2

[code]...

View 7 Replies View Related

PL/SQL :: Best Way To Send A Procedure / Function Output To The Application

Sep 8, 2013

What is the best way to send the output of a PL / SQL function / procedure to the application in Oracle 11g. I understand that it could be different for applications built in JAVA , .Net , SAP etc. 

View 49 Replies View Related

Application Express :: How To Do Selectable Filtering Of Output From Table-function

Jun 26, 2013

I have a report which comes from a table-function.  This produces hundreds of lines of output which the user would like to be able to select and then export just the subset of lines.Looking at the Forum's (this article and this one) this seems possible if you are working with a table where you can re-query the original dataset with just a specific rowset required however as the table-function is generating output on the fly it is hard to rerun the query to reselect the same output for redisplay.  Also most of the reports are working with interactive reports - whilst this is just static output. Is there a way to redisplay the information which has already been shown in an filtered way with check boxes?Is there then a way to have hidden fields which are not shown when the check boxes are selected but which can be shown in the "filtered" view? I am using Apex 4.0 at the moment on an Oracle 10g instance.

View 0 Replies View Related

PL/SQL :: Function Retrieve Output Very Slowly - Alternative Code To Replace With Join?

Aug 6, 2012

In my project, the below function retrieve output very slowly. Is there any alternative code to replace this function with join

CREATE OR REPLACE FUNCTION f_johnson (i_case_id number,i_seq_num argus_app.case_reference.seq_num%type) RETURN VARCHAR2 AS
c_ref VARCHAR2(32500) := null ;
CURSOR c_refer IS

[code]...

View 2 Replies View Related

How To Round Time Up Or Down By 5 Minutes

Nov 29, 2006

is there a prebuilt function that will round say the time of a sysdate up or down 5 mins? so i entered 5:32pm i would want it to round it down to 5:30pm

View 1 Replies View Related

PL/SQL :: Round The Number To Nearest 10k

Nov 1, 2012

I am facing small issue, i need to round the number to the nearest 10k for some finance reporting

ex
1. if number is 2250 round to 10,000
2. if number is 5500 round to 10,000
3. if number is 4912345 round to 4920000
etc..

the number should always round up to nearest 10k..

I am using round function to achieve this..

case 1:-
SQL> Select round(2250,-4) From dual;

ROUND(2250,-4)
--------------
             0

I need 10,000 here..

case 2:-
SQL> Select round(5500 ,-4) From dual;

ROUND(5500,-4)
--------------
         10000

SQL>

This is working fine...

case 3:-
SQL> Select round(4912345 ,-4) From dual;

ROUND(4912345,-4)
-----------------
          4910000

This should round UP to 4920000

let me know if there is any way i can achieve this...

View 10 Replies View Related

SQL & PL/SQL :: Round Robin Implementation Through Script?

Aug 19, 2010

I have to implement round robin algorothim in sql script for allocation of some items to another entity. Not really sure how to do that and if there would be locks while selecting the one which is already being updated and so...!

how to go about it when the number of users involved would be very high to whom the items would be allocated in round robin function.

View 15 Replies View Related

Performance Tuning :: Px Send Round-robin?

Jun 19, 2012

what is "px send round-robin "

View 1 Replies View Related

SQL & PL/SQL :: REGEXP Digit Extraction?

Oct 25, 2011

I am trying to write a pattern that will return multiple numbers when it finds the string "My String" in a Text such as

Text String:
My String 5 Test Need a good regExp 34 to test multiple 12334 occurrences of the same 566 search string My String 3 hopefully this time My String 7 with three of these'

Expected Output:
5
3
7

I managed to write Regular expression that returns only for the first match as shown below.

select TO_NUMBER(REGEXP_SUBSTR(REGEXP_SUBSTR (vSearchText1, ('My String' d+')), 'd+'))

View 30 Replies View Related

SQL Net Round Trips On Long Data Type Table

Oct 12, 2012

We are working on a performance tuning aspect, where in a table has a LONG datatype and number of round trips are increasing based on the number of rows fetched.i.e one round trip for every row.

Background.

1. created a table with LONG data type.
2. inserted bulk load of data.
3. set auto trace on and executed below tests..

SQL> select count(*) from test_long;

COUNT(*)
----------
6110

SQL> desc test_long
Name Null? Type
----------------------------------------------------------------------------------------------------- -------- ----------------------------------------------------------------------------
ID NUMBER
TESTLONG LONG
[code].....

but on LONG column, irrespective of the array size the round trips does not reduce.

View 1 Replies View Related

SQL & PL/SQL :: Time Calculation - Make Varchar To Timestamps But Caught With Round Up / Down?

Apr 12, 2011

calculating values of A & B

(both these fields a_std and a_time are coming as varchar from the parent table in a cursor.(basically they are time period and actual arrival time respectively)

i was juggling with the attempt to make varchar to timestamp or date..but caught with Round up /Round down)

Formula ->

A = Round down [A_TIME - A_STD]
B = Round up [A_TIME) - 10 minute + A_STD]

where

A_TIME VARCHAR2(8) N Time (Format" HH:MM AM/PM") eg "3:50 PM"
A_STD VARCHAR2(5) N Standard time (Format" HH:MM") eg "1:00"

Allowed values for A & B after round up/down = multiple of 10 ( 11:00,11:10,11:20 etc.)

View 10 Replies View Related

SQL & PL/SQL :: Check Wether Digit Is Numeric Or Character

Dec 4, 2004

is there in pl/sql a function to check wether a digit is numeric or character like we have in c 'is_numeric() ' or is_digit() functions�

View 6 Replies View Related

Generate Random And Unique 6 Digit Number In Oracle

Sep 29, 2008

I need to generate random and unique 6 digit number in Oracle. I need to insert these numbers into a table. I tried using DBMS_RANDOM package, which generates random 6 digit numbers, but fails to generate UNIQUE numbers.

View 3 Replies View Related

Forms :: Show Increasing Digit 1 To 100 In Text Field After Pressing One By One

Aug 26, 2013

the code for show increasing digit 1 to 100 in a text field after pressing a button 100 times?

View 26 Replies View Related

SQL & PL/SQL :: How To Print The Multiple Output Statements In Single Output

Jul 1, 2013

DECLARE
JOBSFILE UTL_FILE.FILE_TYPE;
-- TAKE ALL JOB TITLES FROM JOBS
CURSOR JOBSCUR IS
SELECT *
-- DDOCNAME,DDOCTITLE,DSECURITYGROUP,DDOCAUTHOR,DDOCTYPE,DINDATE,PRIMARYFILE,EXTRACTIONDATE,BATCH_ID
FROM TARGET_UCM ;
[code].......

this is my plsql here to print table values i am using many utl_file.put_line statements is there any way to print all table values in a single utl_file.put_line.

View 2 Replies View Related

SQL & PL/SQL :: Integer As Decimal

Feb 18, 2010

I have a field in a table that is declared in the CREATE statement as an INT datatype. However, when I query that table using vb.net, the value comes back as a decimal.

How do you declare a field in Oracle as a true integer data type?

View 5 Replies View Related

SQL & PL/SQL :: Decimal Places In A Value

Dec 12, 2011

I have a table with column amount as decimal(11,2). I want to store the values as shown below

15.30

but it stores as

15.3

Is it possible to store the value in 15.30?

View 4 Replies View Related

PL/SQL :: Two Decimal Points

Aug 10, 2012

What would be the syntax if I want to use use '999G999G990D00' to show only two decimal points for outstanding_receipt_value in the following

((declared_quantity - delivered_qty) * po_unit_price) outstanding_receipt_value

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved