S
Shaukat
I have a table that lists a set of diseases in several columns (say 2
columns, Disease1, Disease2). I want to create a new column (let us say,
Diabetes) which would be coded as "Yes" for a row for which any one of the 2
columns has an entry for "Diabetes". Otherwise, it would be coded "No". I
t would be an update query. I tried the following sql statement but it does
not work:
Update Table1 Set Table1.Diabetes = (IIF(InStr(1,([column1]), "Diabetes")>0
Or (IIF(InStr(1,([columnn2]), "Diabetes")>0, "Yes","No"));
I have tried various versions of this code but nothing seems to work.
Any ideas? or Is it that UPDATE query does not allow for multiple conditions
(Or and AND conditions)?
Thanks in anticipation for the help.
columns, Disease1, Disease2). I want to create a new column (let us say,
Diabetes) which would be coded as "Yes" for a row for which any one of the 2
columns has an entry for "Diabetes". Otherwise, it would be coded "No". I
t would be an update query. I tried the following sql statement but it does
not work:
Update Table1 Set Table1.Diabetes = (IIF(InStr(1,([column1]), "Diabetes")>0
Or (IIF(InStr(1,([columnn2]), "Diabetes")>0, "Yes","No"));
I have tried various versions of this code but nothing seems to work.
Any ideas? or Is it that UPDATE query does not allow for multiple conditions
(Or and AND conditions)?
Thanks in anticipation for the help.