5/30/2018

Exclude 0 from value in SQL Server


Exclude 0 from value in SQL Server

 

Create Table #TempData

(

ColumnData Varchar(20)

)

 

Insert into #TempData values('063506038')

Insert into #TempData values('0063506038')

Insert into #TempData values('00063506038')

Insert into #TempData values('00000063506038')

 

 

Select * from #TempData

 

Select REPLACE(LTRIM(REPLACE( ColumnData,'0',' ')),' ','0')  From #TempData

No comments:

Post a Comment

Tableau interview questions and answers for experienced professionals

  Tableau Interview Questions and Answers for experienced professional 1. What is TABLEAU? Tableau  is the powerful and fastest visualizing ...