which query u can write to sql server doesn't work
inbetween 7.00PM to nextday 9.00AM
Answer Posted / sumesh
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 ? | 11 Yes | 3 No |
Post New Answer View All Answers
What is an example of a foreign key?
What do you mean by data manipulation language?
can a table be moved to different filegroup? : Sql server administration
you accidentally delete the msdb database what effect does this have on your existing sql databases, and how do you recover? : Sql server administration
To which devices can a backup be created and where should these devices be located? : sql server management studio
you notice that the transaction log on one of your databases is over 4gb the size of the data file is 2mb what could cause this situation, and how can you fix it? : Sql server administration
How can I check that whether automatic statistic update is enabled or not?
What is statement level trigger?
What happens if strings are casted into wrong code pages in ms sql server?
What is scan table/view and seek table/view when its occurs? : sql server database administration
Explain Geography datatype in SQL Server
Explain about protocol layer present in SQL server?
What is trace flag in sql server?
What do you mean by an execution plan? Why is it used?
What is the return type of executeupdate ()?