Solved

I am trying to use a charlist wildcard to select surnames that do not begin with WGP but the code i am using is just doing the exact opposite!

Posted on 2013-01-29
2
302 Views
Last Modified: 2013-01-29
So basically, i want to select surnames that do not begin with W, G or P my code is:

SELECT * FROM Person WHERE LastName LIKE '[!wgp]%'

and it is just brining up the surnames that DO start with these letters, quite irritating

Thanks for any help.
0
Comment
Question by:SuperJinx
2 Comments
 
LVL 7

Accepted Solution

by:
Ross Turner earned 75 total points
ID: 38832730
Try:
SELECT * FROM Person WHERE LastName not LIKE '[!wgp]%'
0
 

Author Closing Comment

by:SuperJinx
ID: 38832740
Worked. IN a nutshell lol. Cheers!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Creating Alerts in sql sever 2 25
CROSS APPLY 4 43
Solution for warm standby SQL server 20 32
create insert script based on records in a table 4 10
This is basically a blog post I wrote recently. I've found that SARGability is poorly understood, and since many people don't read blogs, I figured I'd post it here as an article. SARGable is an adjective in SQL that means that an item can be fou…
Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

943 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now