which query u can write to sql server doesn't work
inbetween 7.00PM to nextday 9.00AM

Answer Posted / vimala

Declare @hour varchar(100)
set @time=convert(varchar,getdate(),114)
set @hour=SUBSTRING(@time,1,2)
if(convert(int,@hour)>8 and convert(int,@hour)<19)
begin
print @time
print @hour
end

Is This Answer Correct ?    2 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the downside of using udf?

656


Describe the left outer join & right outer join. : sql server database administration

667


Why do we backup Active Directory ?

704


What is molap and its advantage? : sql server analysis services, ssas

621


How to update multiple rows with one update statement in ms sql server?

739






what is the difference between delete table and truncate table commands? : Sql server database administration

607


What is update locks?

583


Explain how you can deploy an SSRS report?

112


What is the process of normalization?

654


Explain different types of collation sensitivity?

610


How to search for a string in all stored procedure in sql server?

627


What is use of dbcc commands?

704


What is difference between view and materialized view?

612


What are some examples of schemas?

618


How except clause is differs from not in clause?

614