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
What is the STUFF function and how does it differ from the
REPLACE function?
 Question Submitted By :: Latha Sree
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is the STUFF function and how does it differ from the REPLACE function?
Answer
# 1
STUFF - Delete a specified length of characters and insert
another set of characters at a specified starting point.
For example: SELECT STUFF('asdfghjkl', 3, 5, 'XYZ')
             Go
here the result set is:

             asXYZkl

REPLACE - Replace all occurrences of the second given string
expression in the first string expression with a third
expression. 
For Example: SELECT REPLACE('Abhay', 'a', 'KKT')
Here the result set is:

           KKTbhKKTy

 
 
Is This Answer Correct ?    14 Yes 0 No
Abhaymalviya
[ABC Group P. LTD.]
 
  Re: What is the STUFF function and how does it differ from the REPLACE function?
Answer
# 2
STUFF - Delete a specified length of characters and insert
another set of characters at a specified starting point.
For example: SELECT STUFF('asdfghjkl', 3, 5, 'XYZ')
             Go
here the result set is:

             asXYZkl

REPLACE - Replace all occurrences of the second given string
expression in the first string expression with a third
expression. 
For Example: SELECT REPLACE('Abhay', 'a', 'KKT')
Here the result set is:

           KKTbhKKTy
 
Is This Answer Correct ?    1 Yes 2 No
Ruchi
 
 
 

 
 
 
Other SQL Server Interview Questions
 
  Question Asked @ Answers
 
which query u can write to sql server doesn't work inbetween 7.00PM to nextday 9.00AM Wipro4
What is the advantage of specifying WITH GRANT OPTION in the GRANT command?  2
How will u get 5 years back record?  4
1.can we set the more than 1 primary keys for a table? 2.please give me the difference between Cluster Index and non-Clustered Index 3.can we use query like this "Select * from Table1,Table2;"  6
What is SQL server agent? SAP-Labs2
what are batch in sql server? Satyam2
Can we call SP inside a query? Wipro4
Which system table contains information on constraints on all the tables created?  2
What are the type of Indexes? which one is best, why?  5
What is the difference between a Local temporary table and a Global temporary table? How is each one used?  1
What is the difference between Userdefined function and stored procedure? Explain and give the example also  4
How to find the date and time of last updated table?  3
Is it possible to create a stored procedure that runs a query and outputs the results to a text file and allows me to add extra delimeters and static field info. If so How?  1
can anyone explain me the concept of Serialization in Detail and Clear? plz its urgent i have interview on friday (15th feb)  1
I need a query that retrieves info from an Oracle table and a query that retrieves info from a SQL Server table. The info has to be joined together according to Record ID numbers. I have very limited access to the Oracle database but full control of the SQL Server database.How do I join two different queries from two different databases?  1
What is the appropriate number of test cases that you can write on a database? Microsoft1
can you any body tell me the how to decrease the logfile  4
what is difference between having and where clause ?  2
What is database replicaion? What are the different types of replication you can set up in SQL Server?  2
What is a trigger?  6
 
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