Hi Everybody,
I am fetching number data from a table. i want to add '$' sign to this data.
I already tried "TO_CHAR" function. This works fine but it converts number data type to string data type. I want it to be in number format only.
So, is there any way or any function that add '$' sign to number data without converting its data type?
Amit parmar
5 7068
If you want to use string data it will be string only.
If retrieving only for display then try to concadinate the $ with the data.
YOU HAVE TO USE TO_CHAR FUNCTION. -
-
SELECT TO_CHAR(SAL,'$99,999.00') FROM EMP;
-
declare
-
v_num number;
-
begin
-
v_num := to_number('$1234567.67','$9999999.99');
-
end;
-
-
If you want to use string data it will be string only.
If retrieving only for display then try to concadinate the $ with the data.
Hi Debasisdas,
Thanks for your reply,
As i said, i want it in number or money data type only. If i concatenate number with $ sign then the result would be in string data type that i don’t want.
If you know how to convert number data type to money data type then it would also helpful to me.
Amit Parmar
Hi Debasisdas,
Thanks for your reply,
As i said, i want it in number or money data type only. If i concatenate number with $ sign then the result would be in string data type that i don’t want.
If you know how to convert number data type to money data type then it would also helpful to me.
Amit Parmar
Oracle does not provide any thing as MONEY DATA TYPE.
Check out post #3 of this thread on how to concateate "$" symbol before the salary or any amount column to be displayed as $000.00.
Hi Debasisdas,
Thanks for your reply,
As i said, i want it in number or money data type only. If i concatenate number with $ sign then the result would be in string data type that i don’t want.
If you know how to convert number data type to money data type then it would also helpful to me.
Amit Parmar
There is nothing like money datatype in oracle .
If you want to store pure numbers store in numbers else go for char type.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: cooldv |
last post by:
i know how to replace the sign " when SUBMITTING a form in asp by this
code:
message = Replace(usermessage, "'", "''").
My problem is DISPLAYING data in an asp FORM, from an an access
database,...
|
by: tarmat |
last post by:
sorry for this silly little question, but whats the function to grab
the sign of a value?
|
by: thomas |
last post by:
Anyone know how can I get a £ sign in the cell of a table that has been
output by an xsl page
I've tried
<td>£<xsl:apply-templates select="./price" /></td>
<td>£<xsl:apply-templates...
|
by: lbbs |
last post by:
Newbie, so please don't flame me. I am just starting to learn access. I
seem a feature in access a while ago, but don't remember what it was called.
I seen project lab example that had, a plus...
|
by: Sona |
last post by:
Hi,
Could someone please explain what sign-extension means? If I have a hex
number 0x55, how does this get sign-extended? Can a sign-extended
counterpart be equal to -91? In a program I'm...
|
by: qwerty |
last post by:
My end goal is to have a script that takes user input from one pageA, submits to pageB which then displays the parameter values entered on PageA. My problem is that the values are being displayed...
|
by: Steve K. |
last post by:
I recall a few months ago coming across an article allowing for encoding
(or converting?) xml and html documents into sign language as well as
brail for deaf and blind people, and that they were...
|
by: =?ISO-8859-1?Q?Konrad_M=FChler?= |
last post by:
Hi,
a simple question:
Which standard function in c++ gives me the sign of a number?
Thanks
Konrad
|
by: Shailesh Patel |
last post by:
Hi,
Is there any formatting that adds + or - sign before number. Normally it
adds - sigh if number is negative and no sign if positive.
I want to add + sign when number is positive.
Thank you...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |