Active Query Builder support area

If/then and Case statements in SQL

Avatar
  • updated
  • Under review

Is it possible to use a case statement in ActiveQuery? For instance in t-sql you can do this:


case when race = 'w' then 'Not minority' else 'Minority'


Is that something that can be done?

Avatar
Andrey Zavyalov, PM
  • Under review

Hello James, 


Active Query Builder has got support for CASE statements in T-SQL (MS SQL Server) long time ago. Please check that you use the righ Syntax Provider for your server (MSSQLServerSyntaxProvider for MS SQL).