jeudi 19 juillet 2018

Using IF statement to pull boolean column header for an entry

Good morning everyone; Have a question and I'm not good at all with IF statements so if someone could help me I would be very appreciative. I currently have a schedule that looks like this:

Lot(Int) PartNum(Varchar50) Amount(Int) IsPainted(Bool) IsInspected(Bool) Finished(Bool)
1         xxx-0191          500          1               1                 0
2         xxx-0191          700          1               0                 0

What I'm trying to accomplish, and I'm under the thought it'll have to be handled by an IF statement but I'm certainly open for using whatever works best here, is to have a query that will give me the following

Lot  PartNum  Amount  Status
1    xxx-0191 500     Inspected
2    xxx-0191 700     Painted

What I need it to do is just pull the last available column of "True" or "1" in the boolean columns and just display that information in the "Status" column in the query. Can anyone advise best way to do this? Thank you kindly!

Aucun commentaire:

Enregistrer un commentaire