Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2007-03-22
2
222 Views
Last Modified: 2009-12-16
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 #.



0
Comment
Question by:flg8tor96
2 Comments
 
LVL 16

Accepted Solution

by:
rboyd56 earned 250 total points
ID: 18771213
How about

select * from GL_Account where RIGHT(account,1) <> '0' and LEFT(AccountDesc,1) <> '#'
0
 
LVL 75

Assisted Solution

by:Aneesh Retnakaran
Aneesh Retnakaran earned 250 total points
ID: 18771233
select * from GL_Account where AccountDESC like '#%' and amount like '%0'
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question