Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > Oracle
| Search | Today's Posts | Mark Forums Read
Oracle General Oracle database discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 7th, 2007, 07:20 AM
Authorized User
 
Join Date: Mar 2006
Location: , , .
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default Cast in PL/SQL

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.
Code:
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
__________________
------------------------------------------------------------------------------------------------------------
<b><i>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 </i></b>
 
Old March 9th, 2007, 04:56 PM
Authorized User
 
Join Date: Jan 2007
Location: , , .
Posts: 46
Thanks: 2
Thanked 1 Time in 1 Post
Default

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




Similar Threads
Thread Thread Starter Forum Replies Last Post
PL/SQL Somesh ASP.NET 1.0 and 1.1 Basics 7 December 15th, 2006 05:49 PM
PL/SQL cooldude87801 Oracle 1 March 3rd, 2005 10:54 AM
PL/SQL i need help loveboy23 Oracle 3 January 6th, 2005 01:14 AM
PL/SQL help carly_1 Oracle 1 October 19th, 2003 08:14 PM
PL/SQL help Blue Oracle 0 August 12th, 2003 02:54 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.