Change a Text Column to Yes/No Column in a Query

  • Thread starter CC IT via AccessMonster.com
  • Start date
C

CC IT via AccessMonster.com

Hello,

I have a query with two columns labeled “Response†and “OutComeâ€.

I'm trying to figure out how to convert the text values listed the in
“Response†column to a Yes/No value in “OutCome†column.

This is what I need:
All text values in the “Response†column except for “No†would be “Yes†in
the “OutComeâ€.
If the text value is “No†in the “Response†column it would be “No†in the
“OutCome†column.
And if there’s no text it would be “No†in the “OutCome†column.


Any help would be greatly appreciated!

Thanks
 
K

KARL DEWEY

BACKUP DATABASE BACKUP DATABASE
Try this --
UPDATE YourTable SET [OutCome] = IIf([Response]="No" Or [Response] Is
Null,"No","Yes");
 
C

CC IT via AccessMonster.com

Karl,

Disregard my other reply, I tweak the code you provided and it works
perfectly. My fault.
Thank you very much for your help!!!


KARL said:
BACKUP DATABASE BACKUP DATABASE
Try this --
UPDATE YourTable SET [OutCome] = IIf([Response]="No" Or [Response] Is
Null,"No","Yes");
[quoted text clipped - 13 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top