Subject RE: [firebird-support] Re: 'when' conditions limits in case expression
Author Svein Erling Tysvær
>> Is your question theoretical for some kind of case study or DBMS
>> comparison thingy or did you hit a limit already? Just curious. ;-)
>In really, is a practical question.
>I have to classify some records (about 300k) in many categories (nearly 200). So, I thought
>do this directly in the select statement (using case clause). However, write a query with 200
>conditions "when ... then..." to, at the end, the debugger tell you that you reached the
>conditions limits is kind annoying.

I'd be surprised (though not shocked) if Firebirds limits were this small. However, I'd recommend that you rather make another table containing 'nearly 200' records and then JOIN to this table. This way, your WHEN clauses will not overshadow the rest of your query (both regarding which fields are selected and your where clause) and those interested can still look at your new table to see how things translate.

Just my thoughts regarding making your query more easily readable,