Display a number value in Words

Moderator: NorbertKrupa

alamb
Newbie
Newbie
Posts: 7
Joined: Tue Jul 31, 2012 6:22 pm

Re: Display a number value in Words

Post by alamb » Thu Aug 16, 2012 3:55 pm

I would be happy to incorporate this code into our github extensions repository (https://github.com/vertica/Vertica-Extension-Packages)

For legal reasons, I can not include it unless you sign a contributor license agreement, which is straightforward and easy to do:

Quoting from:
https://github.com/vertica/Vertica-Exte ... README.txt

IMPORTANT: If you wish to contribute anything to this repository, in
order for us to accept your pull request you MUST sign and send a copy
of the appropriate Contributor License Agreement to Vertica
(contribs@vertica.com):

license/PersonalCLA.pdf: If you are contributing for yourself
license/CorporateCLA.pdf: If you are contributing on behalf of your company

File links:
https://github.com/vertica/Vertica-Exte ... nalCLA.pdf
https://github.com/vertica/Vertica-Exte ... ateCLA.pdf

User avatar
Julie
Master
Master
Posts: 221
Joined: Thu Apr 19, 2012 9:29 pm

Re: Display a number value in Words

Post by Julie » Thu Aug 16, 2012 6:27 pm

sKwa,

Thanks! That's so cool!

Code: Select all

dbadmin=> select spell_number(8) || ' plus ' || spell_number(8) || ' equals ' || spell_number(16) cool
              cool
---------------------------------
 eight plus eight equals sixteen
(1 row)
Thanks,
Juliette

DGh
Newbie
Newbie
Posts: 14
Joined: Tue Oct 08, 2013 10:10 pm

Re: Display a number value in Words

Post by DGh » Mon Oct 21, 2013 6:30 pm

Hi ,
Is there any way to return the output of a python function as an external procedure in Vertica.
I need to create a UUID generator function - and would like to have something that I can embedd in a query: select uuid_gen(), other col from table

Looks like with python I can only return an exit status. (same with uuidgen in shell) there anything else I can do?

thanks,
Dgh

User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1825
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Re: Display a number value in Words

Post by JimKnicely » Tue Oct 22, 2013 4:08 pm

DGh,

You need to ask your question in the "Connecting to Vertica/Python" forum here:

http://www.vertica-forums.com/viewforum.php?f=35

Otherwise no one will read it because it has nothing to do with the original subject in the thread to which you posted your question ;)
Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

id10t
GURU
GURU
Posts: 732
Joined: Mon Apr 16, 2012 2:44 pm

Re: Display a number value in Words

Post by id10t » Wed Oct 23, 2013 11:46 am

Hi!

[DELETED]
Last edited by id10t on Sat May 09, 2015 3:32 pm, edited 1 time in total.

User avatar
nnani
Master
Master
Posts: 302
Joined: Fri Apr 13, 2012 6:28 am
Contact:

Re: Display a number value in Words

Post by nnani » Wed Oct 23, 2013 2:21 pm

Thanks for the UDF skwa.
nnani........
Long way to go

You can check out my blogs at vertica-howto

DGh
Newbie
Newbie
Posts: 14
Joined: Tue Oct 08, 2013 10:10 pm

Re: Display a number value in Words

Post by DGh » Wed Oct 23, 2013 6:47 pm

sKwa wrote:>> Is there any way to return the output of a python function as an external procedure in Vertica.
No.
Thanks Skwa, I figured that out yesterday (that I could only return exist statuses for scripts).
Wrote a c++ prog using Boost library and followed your instructions for compiling (new to c++ as well :) ) and it works like charm!

Thank you all for the help. This forum is a great platform for beginners like me

DGh

Post Reply

Return to “Vertica SQL”