Case statement using ODBC Text driver

Published: Dec 08, 2011
Post Author Written by eOne Solutions

How to write a case statement in a data source query using the Microsoft ODBC Text driver.

The syntax for a case statement using the Microsoft ODBC Text driver is different than it would be in SQL. This is an example of a case statement:

iif(F15=’DropShip’,’1661′,’2684′) as ACCT

This is an if statement that says if column F15= DropShip then the value returned is 1661, else it is 2684 (Note there are two “i” characters at the beginning of the if statement). ┬áThe column name is returned is aliased as ACCT

Feeling stuck? Get the support and guidance you need to help you power through any data challenge

We're on your integration team. Connect with our people and let us know how we can help you.