ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Databases  >>  SQL Server
 
 


 

 
 Oracle interview questions  Oracle Interview Questions
 SQL Server interview questions  SQL Server Interview Questions
 MS Access interview questions  MS Access Interview Questions
 MySQL interview questions  MySQL Interview Questions
 Postgre interview questions  Postgre Interview Questions
 Sybase interview questions  Sybase Interview Questions
 DB Architecture interview questions  DB Architecture Interview Questions
 DB Administration interview questions  DB Administration Interview Questions
 DB Development interview questions  DB Development Interview Questions
 SQL PLSQL interview questions  SQL PLSQL Interview Questions
 Databases AllOther interview questions  Databases AllOther Interview Questions
Question
which query u can write to sql server doesn't work 
inbetween 7.00PM to nextday 9.00AM
 Question Submitted By :: Chinnu
I also faced this Question!!     Rank Answer Posted By  
 
  Re: which query u can write to sql server doesn't work inbetween 7.00PM to nextday 9.00AM
Answer
# 1
select * from urTable 
Where urDateColumn 
Between '2007-10-20 17:00:00 PM' 
    and '2007-10-21 09:00:00 AM'
 
Is This Answer Correct ?    8 Yes 12 No
Muhammadrashidmughal
 
  Re: which query u can write to sql server doesn't work inbetween 7.00PM to nextday 9.00AM
Answer
# 2
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 ?    10 Yes 1 No
Sumesh
 
 
 
  Re: which query u can write to sql server doesn't work inbetween 7.00PM to nextday 9.00AM
Answer
# 3
CREATE PROCEDURE usp_StartStop_services

AS
Begin
Declare @date as  varchar(100)
SET @date = convert(varchar, getdate(), 114)
Print @date

if @date >= '19:00:00.000' 
	exec MASTER.DBO.xp_cmdshell 'NET Stop SQLSERVER'
Else if

   @date >= '09:00:00.00' and @date < '19:00:00.000' 

	exec MASTER.DBO.xp_cmdshell 'NET  START SQLSERVER'
END
GO
 
Is This Answer Correct ?    11 Yes 0 No
Sarvesh
 
  Re: which query u can write to sql server doesn't work inbetween 7.00PM to nextday 9.00AM
Answer
# 4
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 ?    1 Yes 4 No
Vimala
 

 
 
 
Other SQL Server Interview Questions
 
  Question Asked @ Answers
 
What are the two virtual tables SQL Server maintains for triggers?  2
What should we do to copy the tables, schema and views from one SQL Server to another?  3
I have a table in which phno is one of the columns.i do have some values in tht phno column.i need to update phno column values with 0(zero) as prefix.give me a correct solution plz... Value-Labs5
How do you read transaction logs  1
What is user stored procedure & it purpose? Wipro3
Hi Can any one tell me the Good institute to learn SQL esp for Data Base Testing or SQL from scratch to the proficiency level in Hyederabad and facult also. Thankyou well in advance  6
how to generate XML out of QUERY? McAfee1
1.what is the purpose of using alias name in sql server? with certain example? 2.what is cursor?will u plz explain me in detail with certain example?  3
i want to create procedure for create table in sql server 2005 for example create procedure create_table @table varchar(20) as create @table( id int, name char(20) ) but it will get error what is solution? Aptech4
write coding for importing sql data into a word excel... Oracle1
what is the purpose of creating view is sql server 2000 Wipro9
Can a stored procedure call another stored procedure. If yes what level and can it be controlled?  2
Difference between Cluster and Non-cluster index? Oracle9
how to find out the repeated value from table using groupby function?  3
What r sql reporting services and analysis services? how can we use it. Microsoft2
What is the difference between views and stored procedures? Can we have input parameters for views?  3
What is Trigger? Misys2
can foreign key take role of primary key? TCS4
What are the different ways of moving data/databases between servers and databases in SQL Server?  1
1.Describe way(s) to tune the SQL table in order to optimize performance. 2. Explain SQL Injection and how can you prevent them? Techno-Solutions1
 
For more SQL Server Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com