【发布时间】:2020-02-12 10:08:18
【问题描述】:
我正在尝试从 2005 版本的 SQL Server 中检索数据。如果在 VB 2008 中填充数据网格视图,则调用存储过程的程序。返回的字段之一是布尔字段。我将网格绑定到数据表,但我不想要布尔值。我想用 Y 表示真,N 表示假。下面查询中的布尔字段是 inventory.active 字段
SELECT inventory.inventory_id, equipment.description,
inventory.sale_date,
inventory.warranty_date, inventory.extended_warranty_date,
inventory.location,inventory.serial_number, inventory.IP_address, inventory.printer_name, inventory.active
我尝试过 iif(inventory.active,'Y','N') 但在尝试执行 Sproc 时不接受。
什么是正确的语法。我也尝试过 Case 陈述,但没有成功。
【问题讨论】:
标签: sql sql-server sql-server-2005