If statement in query

Joy83

Member
Local time
Today, 14:21
Joined
Jan 9, 2020
Messages
116
Hi
I have a query that has a certain number
I want to creat a new column in the same query an expression:
If this number between 1 and 10 then put the value 1
 
Better to show us the query. Even go to sql view, copy the code and paste.
Also a sample of before and after would help with communications.
 
Select fld1, fld2, fld3, IIf(fld3 Between 1 and 10, 1, Null) As CalcField From yourtable
 
Note that TECHNICALLY, you cannot create or not create a field, you can only populate or not populate the field you created.
 

Users who are viewing this thread

Back
Top Bottom