Ocean West Posted May 20, 2012 Posted May 20, 2012 Ok this code is not correct. I am looking into my history table and wish to find all partyUIDs of people who haven't renewed yet, for a given chapter / season. Note: Season year is just a 4 digit year. I think i need a join? Let ( [ $a = system::SEASONYEAR ; $b = $a -1 ; $c = system::CHAPTER ]; ExecuteSQL ( "SELECT partyUID FROM history WHERE seasonYear = ? and Chapter = ? UNION SELECT partyUID from history WHERE seasonYear <> ? and Chapter = ? " ; "" ; "" ; $b; $c ; $a ; $c )
RalphL Posted May 20, 2012 Posted May 20, 2012 Try this: Let ( [ $a = system::SEASONYEAR ; $b = $a -1 ; $c = system::CHAPTER ]; ExecuteSQL ( "SELECT partyUID FROM history WHERE seasonYear = ? and Chapter = ? AND NOT IN SELECT partyUID from history WHERE seasonYear = ? and Chapter = ? " ; "" ; "" ; $b; $c ; $a ; $c )
Recommended Posts
This topic is 4916 days old. Please don't post here. Open a new topic instead.
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