Solved

Display rows in SQL table that contain a string

Posted on 2013-02-02
2
283 Views
Last Modified: 2013-02-02
I need to list rows in the Keywords table where the Keyword column contains the string 'penny'

What is the tsql syntax?

KewWordID    Keyword
528            2011 penny stocks
658            2012 best penny stocks
216            2012 best stocks
905            2012 cheap stocks
767            2012 penny stocks
1185            2012 penny stocks to buy

Thanks
0
Comment
Question by:Dovberman
2 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 300 total points
ID: 38846660
select * from Keywords where keyword like '%penny%'
0
 

Author Closing Comment

by:Dovberman
ID: 38846697
Perfect.

Thanks
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
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.

840 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