Interviewer And Interviewee Guide

SQL Server Errors Interview Question:

Suppose I have table nametemp in that I wanted to add some partial data for a particular column name policyno where data is existing in that column. Ex.Policyno like R-KT-SK-EA-134526 like 100 records. In that 100 records some policynos are just like 134527 I mean with out prefix likeR-KT-SK-EA- now I wanted add this prefix as R-KT-SK-EA-134527 for some 50 records. How can I add partial data?

Submitted by: Administrator
UPDATE temp SET = REPLACE(Policyno,'134527','R-KT-SK-EA-134527') WHERE Policyno = '134527'

UPDATE temp SET = 'R-KT-SK-EA'+ Policyno WHERE Policyno = '134527'

UPDATE temp SET = 'R-KT-SK-EA'+ Policyno WHERE policyno not like 'R-KT-SK-EA-%'
Submitted by: Administrator

Read Online SQL Server Errors Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.