Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2013

    Question Unanswered: select query return "text" instead of "boolean value"


    it's been a long time since i did some SQL queries on MS Access, but i forgot how to do to return a text for each row (as field value) when a table field contains "1" as value ?
    for example i have a table named "products" with a field/column called "promotion". Sometime a product is promotional, so in this case, the "promo" column holds "1" as value.

    during a select on products table, how can i do to return "in promotion" (e.g.) if the column "promo" holds "1" for a product ?


  2. #2
    Join Date
    May 2005
    Nevada, USA
    Provided Answers: 6
    What do you want returned if it's not 1? This type of thing:

    IIf(Promotion = 1, "in promotion", "whatever")

    Access stores a Boolean true as -1.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts