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!

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.
SuperJinxAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Ross TurnerConnect With a Mentor Management Information Support AnalystCommented:
Try:
SELECT * FROM Person WHERE LastName not LIKE '[!wgp]%'
0
 
SuperJinxAuthor Commented:
Worked. IN a nutshell lol. Cheers!
0
All Courses

From novice to tech pro — start learning today.