Jan 10 2023 11:21 PM
Hi all,
I m unable to get my iif statement right.
I have a table Dec 22 in which 2 columns are SO and Description. Say if I want a True if the values in SO = Description and otherwise a False. How do I do it please?
I have added a new column "T/F" for this purpose in the same table. Which query should I use to start with?
An Update query?
I tried with T/F: iif([SO]=[Description],"True,"False" in the first row of the query which is Field.
Regards
Ganesh
+91 8451046072
Jan 11 2023 12:41 AM
@Ganesh99 Try the below query. See the attached file.
SELECT Table1.SO, Table1.Description, IIF([SO]=[Description],"TRUE","FALSE") as [Boolean] FROM Table1;
Jan 11 2023 02:29 AM
Jan 11 2023 02:31 AM
Hi, @Harun24HR! Thanks.
This interaction made me feel I m not alone here. Thanks again.
I achieved this. I have been trying to use the Update query as I want this column to have True and False in an already existing table. I am getting an error test saying that there should be at least one destination. I guess the field - Update To can't be left blank. But we are supposed to write the iif function in the first row which happens to be field. So what do I write in Update to?
I see that you have used Select query.
Regards
Ganesh
+91 8451046072
Jan 11 2023 02:40 AM