SQL held please
Author
Discussion

leosayer

Original Poster:

7,842 posts

274 months

Thursday 28th September 2006
quotequote all
The statement below returns results like $8,456
SELECT to_char(val_port,'$999,999')

but no result get returned if I replace $ with £:
SELECT to_char(val_port,'£999,999')

How do I do this?

Don

28,378 posts

314 months

Thursday 28th September 2006
quotequote all
Looks to me like this is nothing to do with SQL and everything to do with character set you have installed on the server...is US or UK?

try

SELECT '$' as Dollar, '£' as Pound


and see what you get back...

leosayer

Original Poster:

7,842 posts

274 months

Thursday 28th September 2006
quotequote all
Don't know which character set, but your select statement returned:

$ £

plasticpig

12,932 posts

255 months

Thursday 28th September 2006
quotequote all
leosayer said:
The statement below returns results like $8,456
SELECT to_char(val_port,'$999,999')

but no result get returned if I replace $ with £:
SELECT to_char(val_port,'£999,999')

How do I do this?


Is this Oracle SQL?

if so try this: SELECT '£' || to_char(val_port,'999,999')

otherwise

SELECT CONCAT('£',to_char(val_port,'999,999'))





Edited by plasticpig on Thursday 28th September 12:01

leosayer

Original Poster:

7,842 posts

274 months

Thursday 28th September 2006
quotequote all
Thanks plasticpig, both of those work thumbup