Ric_ Posted August 8, 2007 Posted August 8, 2007 I'd like to make a pretty report in OpenOffice to shame staff that print ridiculous amounts and other reports to show other things. I think that I can figure out the report business and I have created a DSN to connect to the PyKota database. My problem is that I only want to look at staff so I need to create a clever query. I need to select only the rows where the username does not begin with a digit. How do I do this (either in Design view or SQL view)???
ChrisH Posted August 9, 2007 Posted August 9, 2007 Hmm something like Select * from usernames where username not like '%0' Assuming all the user names you dont want begin with a 0.
Ric_ Posted August 9, 2007 Author Posted August 9, 2007 Hmm something like Select * from usernames where username not like '%0' Assuming all the user names you dont want begin with a 0. Some start with a 6
Ric_ Posted August 9, 2007 Author Posted August 9, 2007 SELECT "username", "balance" FROM "public"."users" WHERE ( ( "username" NOT LIKE '0%' AND "username" NOT LIKE '6%' ) ) ORDER BY "username" ASC That was what I wanted
Ric_ Posted August 9, 2007 Author Posted August 9, 2007 I was close enough tbh Except the % was in the wrong place
ChrisH Posted August 9, 2007 Posted August 9, 2007 I was close enough tbh Except the % was in the wrong place Pfft details tbpfhomgkthanksbye
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now