Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4581 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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 )





Posted

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 )

This topic is 4581 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.