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

  • Home
  • SEARCH
  • 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 6476923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:53:06+00:00 2026-05-25T06:53:06+00:00

Very simple I have a column of string like that : abc1 abc2 abc3

  • 0

Very simple
I have a column of string like that :

 abc1
 abc2
 abc3
 abc4
 abc5

I need to remove ‘abc’ from this column and keep only the number on the right, so column would have only the number like :

 1
 2
 3
 4
 5

I thought about smth like that but it doesn’t work

update table2
-> set col1 = case when 'abc1' then 1
-> else end;

I know how to concat text, I don’t know how to undo it… Help please ^^;

  • 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-25T06:53:07+00:00Added an answer on May 25, 2026 at 6:53 am

    @McArthey already hinted at it, but this is easy to do when the “abc” is consistently “abc” (i.e. the length doesn’t change.)

    Amongst the various string functions is one in particular: RIGHT(). This allows you to select a fixed number of characters from a string. e.g.

    SELECT RIGHT('abc3',1) -- Results in "3"
    SELECT RIGHT('abc3',2) -- Results in "c3"
    

    Coupled with the LENGTH() function, you can conclude the numbers are anything past the 3rd character. i.e.

    SELECT RIGHT('abc3',LENGTH('abc3')-3) -- Results in "3"
    

    Obviously I’m using hard strings ('abc3'), but these can easily be replaced with column names.

    The caveat here is that these all are based on fixed length letter prefixes. The more variable (changing) the “abc” in your example is, the harder picking the numeric value out of the column becomes.

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

Sidebar

Related Questions

i have very simple problem. I need to create model, that represent element of
I have very simple select like this: SELECT * FROM table WHERE column1 IN
So I have a very simple android activity that starts a timer when you
So I have a very simple class that has a method called getThumbUrl() but
I have a very simple ASP.Net page that acts as a front end for
I have a table, schema is very simple, an ID column as unique primary
I have a very simple table with only one column (+ the key column).
I have a very simple report in SSRS that is just a table with
I have a very simple table with two columns, but has 4.5M rows. CREATE
My use case is very simple : I have a GUI application, and inside

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.