SQL SERVER 2000 Using IIF in SELECT Statement


  • Hi Good Guys,

    I need your help, Please help me.

    I am trying to retrieve data from SQL SERVER 2000 Table, TBLSupplier whose ActiveStatus datatype is BIT which consist of value 0 (zero) or 1 (one).  to display on the VBNT2008 DataGridView.

    But the SQL String Select statment is not working.

    Error message:

    Incorrect syntax near '='

    Select SupplierId, SupplierName, IIF (ActiveStatus =1, 'YES', 'NO') as [Status] from TblSupplier

    • Edited by Tee Leong Sunday, September 12, 2010 3:56 AM type error
    Sunday, September 12, 2010 3:56 AM


All replies