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 do you understand by coalesce in sql server?
Define clusters?
Can we return Data from 4(more than 1) tables in stored procedure?
How do you manipulate data?
What are the differences between union, intersect, and minus operators?
How to retrieve error messages using mssql_get_last_message()?
what are different types of raid configurations? : Sql server database administration
How will you know when statistics on a table are obsolete?
Can a synonym name of a table be used instead of a table name in a select statement?
What is the importance of a recovery model?
Write a sql query to delete duplicate records from a table called table1
How to convert a table data in XML format in sql server?
How to backup SQL Server Reporting Services ?
Explain the concepts and capabilities of sql server?
what is an extended stored procedure? : Sql server database administration