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 236207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:19:35+00:00 2026-05-11T20:19:35+00:00

This question is similar to my last question . Except this time I’m using

  • 0

This question is similar to my last question. Except this time I’m using letters rather than 6 digit integers. I want to find the out of sequence “letters”.

Let’s say I have the following data:

id | Date | Letter
-----------------------------
01 | 5/1/2009 | X
02 | 5/1/2009 | Y
03 | 5/1/2009 | Z
04 | 5/1/2009 | A
05 | 5/1/2009 | B
06 | 5/1/2009 | D

I would like to be able to come up with a query that would tell me there should be a row with “C” in between row 05 and 06.

In my last question (using INTs) I was offered something similar to the following solution, and it worked great.

SELECT * from TABLE1 t1 
LEFT OUTER JOIN TABLE2 t2 ON t2.INTCol - 1 = t2.INTCol AND t1.date = t2.date
WHERE t2.id IS NULL

Well, with letters (as far as I know) I can’t say (G – 1). So, is there another way I can do this?

The database I am using is SQL Server 2005. I believe there is an easy solution in PL/SQL that uses TRANSLATE, but I don’t thing I can do anything like using TSQL.

  • 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-11T20:19:36+00:00Added an answer on May 11, 2026 at 8:19 pm

    You can convert the char(1) to its ascii number using

    ASCII(Letter)
    

    You can then increment this by one and return it to a letter using CHAR (if necessary), so your code would be this:

    SELECT * from TABLE1 t1 
    LEFT OUTER JOIN TABLE2 t2 
          ON ASCII(t1.INTCol) - 1 = ASCII(t2.INTCol) 
          AND t1.date = t2.date
    WHERE t2.id IS NULL
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 297k
  • Answers 297k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I dont know if it is possible to bind a… May 13, 2026 at 7:23 pm
  • Editorial Team
    Editorial Team added an answer Just got this working thanks to some help from this… May 13, 2026 at 7:23 pm
  • Editorial Team
    Editorial Team added an answer Yes, single quotes are valid. From the XML spec: [10]… May 13, 2026 at 7:23 pm

Related Questions

This question is similar to my last question . Except this time I'm using
I have a list of files, and i need to read them each in
I've been learning F#, and I'm writing a tool in it. Everything works fine
I have many different branches/checkouts of the same project code on my development machine.
I'm working on porting a Visual C++ application to GCC (should build on MingW

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.