Subject: Cast in PL/SQL
Posted By: nkrust Post Date: 2/7/2007 6:20:45 AM
Hi,

How to convert a variable to another type in PL/SQL stored proc..?
i'm using the following piece of code but its givin errors while running.

SELECT cast(tbl_profile.usertext AS NUMBER(3)) INTO vUserText FROM tbl_profile WHERE PLANID = c.NUM;


------------------------------------------------------------------------------------------------------------
Adventure, Play, Alive, Fast, Race, Addict, React, Attack, Heat, Aggression, Blast, Ahead, Escape, Challenge, Anarchy, Game, Real, Damage, Insane, Acclerate,Passion, Fear, Dominate, Crazy, Awesome, Sweat, Habit, Avenge, Balls, Imagine, Viril, Chaos, Amuse, Heavy, Panic, @#!%, Fanatic
Reply By: code_lover Reply Date: 3/9/2007 3:56:11 PM
As far as i know Oracle provides a set of conversion functions which are as follows:

TO_CHAR()
TO_NUMBER()
TO_DATE()
HEXTOROW()
RAWTOHEX()
ROWIDTOCHAR()
CHARTOROWID()


MAXOOD!

Life is an endless journey towards perfection


Go to topic 57496

Return to index page 6
Return to index page 5
Return to index page 4
Return to index page 3
Return to index page 2
Return to index page 1