why i am unable to retrieve holiday name
-
-
Assuming you are using SQL Server - take your code to SSMS and test it, then tell us that the error is. If there is no error then check there is a record to get.
Never underestimate the power of human stupidity RAH
-
Assuming you are using SQL Server - take your code to SSMS and test it, then tell us that the error is. If there is no error then check there is a record to get.
Never underestimate the power of human stupidity RAH
i don't know how to use if...exists i am new to asp.net & database as well my requirement is to get 3 consecutive working days declare @i int declare @count int set @i=0 set @count=0 while(@count <= 3) begin 1) select Holiday_Name from Holiday where Holiday_On = DATEADD(day,@i,CONVERT(date,GETDATE())) the above statement is to check whether holiday exists 2) IF DATEPART(day, DATEADD(day,@i,CONVERT(date,GETDATE()))) = 7 OR DATEPART(dw, DATEADD(day,@i,CONVERT(date,GETDATE()))) = 1 the 2nd statement is to check whether weekend or not set @i = @i + 1 if there no holiday and not weekend then only the following code is executed set @count = @count + 1 here i have to retrieve the date...i don't know how to get the date...because i vil get 3 dates... end actually i no need to select holiday name in 1)statement...there i am checking for holiday..