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

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

    Hello,

    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 ?

    thx.

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    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.
    Paul

Posting Permissions

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