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
What methods do you follow to protect from sql injection attack?
explain databases and sql server databases architecture? : Sql server database administration
How do I view a trc file?
How to create a ddl trigger using "create trigger" statements?
How does recursive cte works in sql server?
What is molap and its advantage? : sql server analysis services, ssas
How can you check the level of fragmentation on a table?
How to override dml statements with triggers?
How to get @@error and @@rowcount at the same time?
What protocol does sql server use?
What are the differences between stored procedure and the dynamic sql?
Explain the first normal form(1nf)?
What are views in ms sql server?
Explain some stored procedure creating best practices or guidelines?
How to create a view using data from another view?