Solved

In SQL Server, SELECTION based on the first letter of the entries in a given column

Posted on 2009-05-06
3
154 Views
Last Modified: 2012-05-06
I need a query that selects every record for which the last name ("LastName") begins with "S"

Thanks!
John

0
Comment
Question by:gabrielPennyback
3 Comments
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 500 total points
ID: 24321644
Hello gabrielPennyback,

select *
from urTable
where LastName like 'S%'


Regards,

Aneesh
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 24321649
select * from tablename where lastname like 's%'
0
 
LVL 1

Author Closing Comment

by:gabrielPennyback
ID: 31578831
Thanks, aneesh.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL help 5 55
Insert from Stored Procedure where some field/s > 0 7 45
Caste datetime 2 57
Unable to save view in SSMS 21 70
I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled task…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

803 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