views:

34

answers:

1

I am looking to select ids that are backwards from some standards we have outlined.

What I would like to do is this:

SELECT iid FROM login WHERE iid LIKE lastname'.%'

In theory this should catch everyone where there id is lastname.firstname instead of firstname.lastname. Either way any suggestions would be awesome.

Thank you.

+1  A: 

How about SELECT iid FROM login WHERE iid != CONCAT(firstname,'.',lastname) :)

Or SELECT iid FROM login WHERE iid LIKE CONCAT(lastname,'.%')

andrem
That makes perfect sense! Thank you, just couldn't wrap my head around it for some reason yesterday.
cbattlegear