Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What methods do you follow to protect from sql injection attack?

1072


explain databases and sql server databases architecture? : Sql server database administration

1012


How do I view a trc file?

975


How to create a ddl trigger using "create trigger" statements?

1185


How does recursive cte works in sql server?

1059


What is molap and its advantage? : sql server analysis services, ssas

1033


How can you check the level of fragmentation on a table?

1087


How to override dml statements with triggers?

1271


How to get @@error and @@rowcount at the same time?

1083


What protocol does sql server use?

985


What are the differences between stored procedure and the dynamic sql?

1134


Explain the first normal form(1nf)?

1075


What are views in ms sql server?

1118


Explain some stored procedure creating best practices or guidelines?

1000


How to create a view using data from another view?

994