Solved

Syntax for selecting partial row

Posted on 2008-10-16
2
161 Views
Last Modified: 2012-05-05
I'm trying to query a column in my table called invoice.  Which has data like:

123
154
14235
123-old

ect....

I only want to get the ones that have a "-old" on them.  Below is what I'm trying for but the * doesn't work the way I need it to.

select InvoiceNo
from DebtorService
where Invoiceno = *-old
0
Comment
Question by:N R
[X]
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
2 Comments
 
LVL 17

Accepted Solution

by:
Daniel Reynolds earned 500 total points
ID: 22734854
select InvoiceNo
from DebtorService
where Invoiceno LIKE '%-old'
0
 
LVL 11

Author Closing Comment

by:N R
ID: 31506884
Perfect, thanks.
0

Featured Post

Free Webinar: AWS Backup & DR

Join our upcoming webinar with experts from AWS, CloudBerry Lab, and the Town of Edgartown IT to discuss best practices for simplifying online backup management and cutting costs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
sql update 2 37
SQL Syntax 6 29
install sql server management studio 2008 express error 3 31
Not listening to where 1 18
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

756 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