I have some queries that I wrote in MS Access and I'm trying to convert them to SQL server syntax. In access, the SQL code is as follows:
select distinct
TableA.Field1
TableA.Field2
IF(TableA.Field3 like "X","1",IF(TableA.Field3,"Y","2",TableA.Field3))
From... etc.
What is the equivalent SQL syntax for a nested IF loop such as this? Thanks.
select distinct
TableA.Field1
TableA.Field2
IF(TableA.Field3 like "X","1",IF(TableA.Field3,"Y","2",TableA.Field3))
From... etc.
What is the equivalent SQL syntax for a nested IF loop such as this? Thanks.