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
how can a database be repaired? : Sql server administration
What happens if time-only values are provided as date and time literals?
Explain view in sql server?
Difference Between ORDER BY Clause and GROUP BY Clause in SQL?
What are subqueries in sql server? Explain its properties.
Can I disable or restrict ssrs export formats (rendering formats)?
What is de-normalization and what are some of the examples of it?
you have separate development and production systems you want to move a copy of a development database into production to do this, you do a backup on the development system and restore to the production system after a few minutes, you begin getting calls from several customers saying that they are denied access to the system why? : Sql server administration
Can a synonym name of a table be used instead of a table name in a select statement?
What are the common performance issues in sql server?
Explain what you mean by 3 tier architecture.
How would you add a section to a table?
Differentiate between mongodb vs. Sql server?
What are the components of dbms?
What are the properties of sub-query?