SQLTeam.com | Weblogs | Forums

Automatic change values in a query


#1

Hi all , i have this situation to solve in MS ACCESS 2013
A query generate the following table:

Result (String1,String2,Int1,Int2,Int3)
Now ,a part of the string, the query generate 3 numbers (int1,int2,int3) and i'd like in the result query to see the numbers automatically converted in to strings.

For example: If i have a record (Example,record,33,22,15) , i'd like to put a condition for int3 that whenever it's lower than 50 it changes that number to the string "low" and if its greater than 50 the string "high".

So the record displayed should be (Example , record , 33 , 22 , low)

If anyone has some ideas i would appreciate a lot


#2

try this

select String1,String2,Int1,Int2 , IIF(Int3 >50 ,'HIGH', 'LOW')