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
What are the key configuration files for sql server reporting services ?
What are the steps to insert a table?
How to use old values to define new values in update statements in ms sql server?
Explain the use of containers in ssis and also their types?
how can you check the level of fragmentation on a table? : Sql server administration
Is BCNF better than 2NF & 3NF? Why?
what protocol both networks use? : Sql server database administration
Can I delete event logs?
What are the advantages of passing name-value pairs as parameters?
Tell me extended events in sql server 2008?
When multiple after triggers are attached to sql table, how to control the order of execution?
How many clustered indexes can be created on a table? I create a separate index on each column of a table. what are the advantages and disadvantages of this approach?
What is self join in sql server joins?
How do I find the sql server database version?
what are the core components of SSRS?