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
How to turn on the mssql api module in php?
What do you understand by user-defined function in the sql server and explain the steps to create and execute a user-defined function in the sql server?
Explain having clause and where clause?
What is co-related sub query?
what stored procedure would you use to view lock information? : Sql server administration
Explain what is row_number function?
Tell me can we use custom code in ssrs?
How to create function without parameter in sql server?
How should i optimize the time for execution of stored procedure having single input and many output from the different tables?
Can you move the resources after pausing the node? : sql server database administration
How to use "if ... Else if ... Else ..." Statement structures in ms sql server?
What is the fillfactor concept in indexes?
Is sql server free?
Once setting replication, can you have distributor on sql server 2005, publisher of sql server 2008?
What is impersonation? What are the different impersonation options available in ssas? : sql server analysis services, ssas