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

Related Questions

This is similar to this question , but I want to include the path
Very similar to this question , except for Java. What is the recommended way
This is similar to my last question; but from a different angle. See if
This question was inspired by a similar question: How does delete[] know the size
This question is very similar to SQL Server 2005: T-SQL to temporarily disable a
This question is about a whole class of similar problems, but I'll ask it
Similar question as this one but for a Microsoft Environment. Email --> Exchange Server
Similar to this question , after running the following code the browser dialog does
Similar to this question ... What are the worst practices you actually found in
I asked a similar question about this previously, but I did not specify that

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.