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


Please Help Members By Posting Answers For Below Questions

What do you understand by coalesce in sql server?

503


Define clusters?

654


Can we return Data from 4(more than 1) tables in stored procedure?

621


How do you manipulate data?

500


What are the differences between union, intersect, and minus operators?

583






How to retrieve error messages using mssql_get_last_message()?

539


what are different types of raid configurations? : Sql server database administration

492


How will you know when statistics on a table are obsolete?

615


Can a synonym name of a table be used instead of a table name in a select statement?

584


What is the importance of a recovery model?

616


Write a sql query to delete duplicate records from a table called table1

592


How to convert a table data in XML format in sql server?

2126


How to backup SQL Server Reporting Services ?

103


Explain the concepts and capabilities of sql server?

547


what is an extended stored procedure? : Sql server database administration

506