PL/SQL :: Truncation Of Suffixing Zeros
Jul 10, 2013
I have a query regarding the below issue:
SELECT TO_CHAR(12345.60, '99999D99'),
TRUNC(15.80, 2),
LPAD(RPAD (16408.80, 20, ' '), 10, ' ')
FROM dual;
When I hit this query the, numeric value to be displayed in my report should be '16408.80', but when I use LPAD, RPAD the '.80' (zero) gets eliminated/truncated.As per the above query can I get the desired output using LPAD/RPAD or without converting the number to character type For ex. TO_CHAR(12345.60, '99999D99')
View 5 Replies
Dec 15, 2011
I have to truncate two partitions from the same table parallelly at a time.
ALTER TABLE tablename TRUNCATE PARTITION partitioname1;
ALTER TABLE tablename TRUNCATE PARTITION partitioname2;
Huge data is present in each partition.is this possible, means it does not lock table for another alter truncate partition statement?
View 1 Replies
View Related
Feb 13, 2013
I have column and loading time stamp like below.
RECORDTIMESTAMP TIMESTAMP DEFAULT to_timestamp(to_char(sysdate, 'DD-Mon-YYYY HH24:MI:SS')||'.0', 'DD-Mon-YYYY HH24:MI:SS.FF1') NOT NULL ENABLE
But RECORDTIMESTAMP data looks like '4/8/2009 5:48:00.000000 PM' I would like to supress 3 zeros in milli seconds section.( 3 more zero in milli seconds section)
View 10 Replies
View Related
Sep 15, 2013
I want to add number of zeros after a number dynamically. eg: If number is 2 and number of zeroes to be added is 5 then final output should be 200000;
View 12 Replies
View Related
Oct 30, 2011
i need to update field AA with zeros before the number (max 4 digits) for example: 1 = 0001 , 13 = 0013 , 1234 = 1234 .
View 1 Replies
View Related