CURRENCY function



IBM's flagship relational database management system

CURRENCY function

Postby latimeria » Sun Feb 10, 2019 9:54 pm

Dear wise people of the internet,
please help! I'm trying to use DB2 CURRENCY function somehow and I have no idea where to basically put this whole currency thing in my SQL select. Let's say it's a primitive 'select * from abc.def' and I need the output displayed with nice commas (123,45.00) and euro sign. And what to put btw cause first the manual says CURRENCY but then in examples it says VALUES, none of them works for me (I get -104 error for illegal symbols all the time in all the variations I try), and I haven't found a single example of the whole line anywhere in the internet for that. Please help! Thank you in advance.
There was an old person of Fife,
Who was greatly disgusted with life;
‎They sang him a ballad,
‎And fed him on salad,
Which cured that old person of Fife.
latimeria
 
Posts: 13
Joined: Wed Jan 03, 2018 5:58 pm
Has thanked: 8 times
Been thanked: 0 time

Re: CURRENCY function

Postby latimeria » Mon Feb 11, 2019 11:03 pm

Ok, for possible future generations of poor people like me: it's SELECT DSN8.CURRENCY( 'VALUE','CURRENCY','INDICATOR' ) FROM TABLE;
There was an old person of Fife,
Who was greatly disgusted with life;
‎They sang him a ballad,
‎And fed him on salad,
Which cured that old person of Fife.
latimeria
 
Posts: 13
Joined: Wed Jan 03, 2018 5:58 pm
Has thanked: 8 times
Been thanked: 0 time

Re: CURRENCY function

Postby NicC » Tue Feb 12, 2019 2:44 pm

Thank you for posting the solution (and well done for persisting!).
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: CURRENCY function

Postby latimeria » Tue Feb 12, 2019 2:48 pm

Thank you :)
There was an old person of Fife,
Who was greatly disgusted with life;
‎They sang him a ballad,
‎And fed him on salad,
Which cured that old person of Fife.
latimeria
 
Posts: 13
Joined: Wed Jan 03, 2018 5:58 pm
Has thanked: 8 times
Been thanked: 0 time


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post