Results 1 to 2 of 2

Thread: Help

  1. #1
    Join Date
    Apr 2002
    Location
    pompano beach, FL
    Posts
    8

    Red face Unanswered: Help

    Can someone tell me what's the equivalent of this access code in sql:
    IIf([item_no] In ("MISDEF","MISDES"),[invdiv],[moddiv]) AS ModDivX

    It is in the select statement.

  2. #2
    Join Date
    Feb 2002
    Location
    Houston, TX
    Posts
    809
    something like this?

    Code:
    declare @item_no varchar(10)
    set @item_no = 'MISDEF'
    select case when @item_no in ('MISDEF','MISDES') then 'invdiv' else 'moddiv' end as ModDivX
    set @item_no = 'MISDES'
    select case when @item_no in ('MISDEF','MISDES') then 'invdiv' else 'moddiv' end as ModDivX
    set @item_no = 'spud'
    select case when @item_no in ('MISDEF','MISDES') then 'invdiv' else 'moddiv' end as ModDivX
    Last edited by Paul Young; 09-17-02 at 12:07.
    Paul Young
    (Knowledge is power! Get some!)

Posting Permissions

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