mattyboy2000
Programmer
Hi,
I have a table in SQLServer that contains a Field called Monthly. It is a varchar(1) type field that contains 'Y' or 'N'.
In my VB Application I want to use it as a boolean. I want to do it via a SQL Stored procedure. I tried to do a case statement:
SELECT Ref as SettleCode, [Desc],
CASE SetMonth WHEN 'Y' THEN True
ELSE False
END as bolMonthly, SettDays, DiscPerc
FROM Settle
The problem is that True and False are not constants in SQL Server. I tried to return 0 or 1, but my program then saw them as integers
Any help or sudgestions will be greatfully recieved
Matt
I have a table in SQLServer that contains a Field called Monthly. It is a varchar(1) type field that contains 'Y' or 'N'.
In my VB Application I want to use it as a boolean. I want to do it via a SQL Stored procedure. I tried to do a case statement:
SELECT Ref as SettleCode, [Desc],
CASE SetMonth WHEN 'Y' THEN True
ELSE False
END as bolMonthly, SettDays, DiscPerc
FROM Settle
The problem is that True and False are not constants in SQL Server. I tried to return 0 or 1, but my program then saw them as integers
Any help or sudgestions will be greatfully recieved
Matt