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
Explain cross join or cartesian product in sql?
List out what other servers you can use with ssrs?
How to convert numeric expression data types using the cast() function?
What should be the fill factor for indexes created on tables? : sql server database administration
What is the sql profiler?
What is the use of stored procedure?
What do you understand by recursive stored procedures?
What are points to remember while using the fillfactor argument?
What are the differences between INNER JOIN, LEFT JOIN and RIGHT JOIN in SQL Server?
What is right outer join in sql server joins?
What are null values in ms sql server?
Does an index slow down updates on indexed columns?
Explain throw statement in sql server 2008?
Define magic tables in sql server?
What is the difference between varchar and nvarchar datatypes?