troubleshooting Question

Skip a letter in the alphabet in SQL query

Avatar of jnordeng
jnordeng asked on
Microsoft SQL Server
2 Comments1 Solution74 ViewsLast Modified:
Hi I was asked to come up with code to convert letters of the alphabet to months of the year which I did no problem. But then they  came back to me and said I needed to skip the letter "I"  in the process. I am stumped. If anyone can help I would sure appreciate it.

Data is 7115A12345. "A" is the month in this serial number that we want to convert to the month number but we need to skip "I" in the process

(ASCII(SUBSTRING(serial_number,5,1))- ASCII('A') + 1)  as [MONTH]
ASKER CERTIFIED SOLUTION
Rich WeisslerProfessional Troublemaker^h^h^h^h^hshooter

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros