May 20, 201213 yr 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 )
May 20, 201213 yr 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 )
Create an account or sign in to comment