Hi All,
I wrote one Store Procedure for my project.In my querry i have one bit field called "Booking Required ?" and its probable answer is a checkbox i.e YES or NO.
Now this querry is used to create a view but on the view page this field come as "0" for NO and "1" for YES.But i want these field as YES or NO type and not the 0 and 1 type,So how can i use "case" statement in my querry????plz guide me...
My SP is as follows :
CREATE PROCEDURE [dbo].[usp_RW_TASEXIBIITA]
--@int INT
AS
BEGIN
SET NOCOUNT ON
SELECT tbl_TAS_TASRequestMaster.SubmissionDate
,tbl_PM_Project.ProjectName
,tbl_TAS_TASRequestMaster.TRNo
,tbl_PM_Employee.EmployeeName
,tbl_TAS_TASRequestMaster.DateOfTravel
,tbl_TAS_TASRequestMaster.PlaceOfTravel
,tbl_TAS_TASRequestMaster.DateOfTravel
,tbl_TAS_TASRequestMaster.ReturnDate
,tbl_PM_Customer.CustomerName
,tbl_PM_Role.RoleDescription
,tbl_TAS_TASRequestMaster.Purpose
,tbl_TAS_TASRequestMaster.BorneBy
,tbl_TAS_TASRequestMaster.BookingRequired--a bit field
,tbl_TAS_TASRequestMaster.BookingDetails
,tbl_TAS_TASRequestMaster.HotelBookingRequired
,tbl_TAS_TASRequestMaster.HotelDetails
,tbl_TAS_TASRequestMaster.AmountRequested
,tbl_TAS_TASRequestMaster.PayementMode
,tbl_TAS_TASRequestMaster.AdvanceAmountGiven
,tbl_TAS_TASRequestMaster.CommentsByFinanceDept
FROM tbl_TAS_TASRequestMaster WITH(NOLOCK)
INNER JOIN tbl_PM_Project WITH(NOLOCK)
ON tbl_PM_Project.ProjectID = tbl_TAS_TASRequestMaster.ProjectID
INNER JOIN tbl_PM_Employee WITH(NOLOCK)
ON tbl_PM_Employee.EmployeeID=tbl_TAS_TASRequestMaster.EmployeeID
INNER JOIN tbl_PM_Customer WITH(NOLOCK)
ON tbl_PM_Customer.Customer= tbl_TAS_TASRequestMaster.CustomerID
INNER JOIN tbl_PM_Role WITH(NOLOCK)
ON tbl_PM_Role.RoleID=tbl_PM_Employee.PostID
SET NOCOUNT OFF
END