[SOLVED] SQLAlchemy MSSQL-IIF

Issue

This Content is from Stack Overflow. Question asked by AGI_Max

I could not find anything specific about this, but does SQL-Alchemy support the MSSQL-IIF function?

Inside the docs I could not find any info for this and I guess I have to use the case-when block or a simple if instead?



Solution

It seems that SQLAlchemy does not support IIF for SqlServer. The function is equal to the IF Function in MySQL but SqlAlchemy does not recognize this difference. Instead a case when then block can be used as an alternative to func.IF.


This Question was asked in StackOverflow by AGI_Max and Answered by AGI_Max It is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?