• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 250
  • Last Modified:

Help with SQL statment that only includes records without a # at the start of the string.

I have a table (GL_Account) with two columns that I want to retreive Account & AccountDesc.  Both are type Char.  I want to select only the rows that the Account does not end in 0 and the AccountDesc does not start with #.

2 Solutions
How about

select * from GL_Account where RIGHT(account,1) <> '0' and LEFT(AccountDesc,1) <> '#'
Aneesh RetnakaranDatabase AdministratorCommented:
select * from GL_Account where AccountDESC like '#%' and amount like '%0'
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now