Click here to Skip to main content
15,893,486 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi ,

i got one requirement like my client will sent me the values , while storing the values i have to add % symbol to that value.

Ex:

create table test(payment number)
insert test values(1)
insert test values(2)
insert test values(0.1)


select * from test


Payment
-------
1%
2%
0.1%

how can i achieve the above output.

Thanks in advance
Posted
Updated 2-Jan-13 20:37pm
v3

hi i got the answer by writing the query in this format

SELECT payment || '%'  FROM test_1;
 
Share this answer
 
v3
Comments
RDBurmon 3-Jan-13 2:31am    
Great
Use this select statement .

SQL
select to_char([payment number]) || ' %' from test ;
 
Share this answer
 
v2
Comments
FranklinRemo 3-Jan-13 1:46am    
Hi RDBurmon , thank you for reply.

it is showing the error like 0RA-00936 Missing Expression
RDBurmon 3-Jan-13 1:59am    
Can you run this query and send me result ?
SELECT [payment number] FROM test;
FranklinRemo 3-Jan-13 2:09am    
Hi it is giving the same error i.e ORA -00936 Missing Expression.
my column name is payment only then how could you specify [payment number].if i write payment also it is giving same error

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900