Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7550679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T10:16:33+00:00 2026-05-30T10:16:33+00:00

In pretty much any normal programming language, one can cast an integer/short/byte into a

  • 0

In pretty much any normal programming language, one can cast an integer/short/byte into a char with ease using a cast similar to this

char alpha = (char)123;

I am trying to do this in an Oracle database. I have column of type CHAR(1 BYTE) and I want to be able to store NUMBER values (non of which will be larger than around 30) in it. The CAST function isn’t letting me do it.

rank := 10;
CAST(rank as CHAR(1))

where rank is a NUMBER variable. I get an error:

Value from cast operand is larger than cast target size.

How is this done in Oracle PL/SQL?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T10:16:34+00:00Added an answer on May 30, 2026 at 10:16 am

    As per my comment on @northpole’s answer…

    The closest to what you want might not be exactly correct but the CHR function would convert the numeric to it’s ascii equivalent.
    i.e. alpha := chr(113); would put the char “q” into the alpha variable thereby storing your numeric “113” as a single byte.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It's C# + .net 2.0, but this can be pretty much any environment I
Pretty much the same as this question. But I can't seem to get this
Pretty much what it says on the tin. I've tried googling around but can't
I am creating a View that needs to consume pretty much any gesture going.
I'm using std::make_pair() for this example because pretty much any C++ programmer ought to
Pretty much every other editor that isn't a vi descendant (vim, cream, vi-emu) seems
Pretty much what the title says really. We have some code that is .NET
pretty much what the title says. I am using an Ajax Drop Down as
Pretty much as the question asks. Answers preferably in pseudo code and referenced. The
Pretty much what the question says. What's the difference between the two classes of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.