Solved

SQL Server 2012 Row Selection

Posted on 2016-11-21
2
39 Views
Last Modified: 2016-12-28
I need to select rows without Blender in the name. I have used the not like operator but it seems not to be working.
Screenshot--883-.png
0
Comment
Question by:Rob Fried
2 Comments
 
LVL 28

Accepted Solution

by:
Pawan Kumar earned 250 total points
ID: 41895977
try
SELECT SerialNo,Name,Cost
FROM Equipment
WHERE Cost < 2000 AND name NOT LIKE '%blender%'

Open in new window

0
 
LVL 65

Assisted Solution

by:Jim Horn
Jim Horn earned 250 total points
ID: 41895984
^^^  Your T-SQL NOT LIKE was missing the wildcard characters % that are present in the above query.
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

Suggested Solutions

Title # Comments Views Activity
best counters for cpu high usage 3 32
Get the latest status 8 32
create an aggregate function 9 34
[SQL server / powershell] bulk delete table from CSV 8 33
Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

777 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