Skip to content
Advertisement

SQL statement to increment multiple case functions from multiple tables

I’m trying to increment the SQL generated column “Counter” by making 1 case statement. I get the error “Invalid Column” for Counter in my case statement. Any help is appreciated.

Advertisement

Answer

Shot in the dark. It’s not clear what order you need the rows to be counted or what the relationship between the two tables is.

Per comment below it appears you just need to count the maxima across a bunch of tables:

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement