J Joy83 Member Local time Today, 14:21 Joined Jan 9, 2020 Messages 116 Apr 27, 2022 #1 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
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
jdraw Super Moderator Staff member Local time Today, 17:21 Joined Jan 23, 2006 Messages 15,573 Apr 27, 2022 #2 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.
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.
P Pat Hartman Super Moderator Staff member Local time Today, 17:21 Joined Feb 19, 2002 Messages 47,578 Apr 28, 2022 #3 Select fld1, fld2, fld3, IIf(fld3 Between 1 and 10, 1, Null) As CalcField From yourtable
The_Doc_Man Immoderate Moderator Staff member Local time Today, 16:21 Joined Feb 28, 2001 Messages 30,493 Apr 29, 2022 #4 Note that TECHNICALLY, you cannot create or not create a field, you can only populate or not populate the field you created.
Note that TECHNICALLY, you cannot create or not create a field, you can only populate or not populate the field you created.
J Joy83 Member Local time Today, 14:21 Joined Jan 9, 2020 Messages 116 Apr 29, 2022 #5 Pat Hartman said: Select fld1, fld2, fld3, IIf(fld3 Between 1 and 10, 1, Null) As CalcField From yourtable Click to expand... This is helpful thanks
Pat Hartman said: Select fld1, fld2, fld3, IIf(fld3 Between 1 and 10, 1, Null) As CalcField From yourtable Click to expand... This is helpful thanks
P Pat Hartman Super Moderator Staff member Local time Today, 17:21 Joined Feb 19, 2002 Messages 47,578 Apr 29, 2022 #6 You're welcome