Friday, 18 October 2019

Convert any number to Specific Digit in sql


First Check This Select REPLACE(STR(ColumnName,Digit),'0','0') From Table_Name

My Column Digit is Suppose 100 And I have To add or Convert Into in 0000000100
Then This Command I have To Execute

Example : select REPLACE(STR(Column_Name,10),'  ','1') as ABC from table_Name

ABC
1111111111
1111111111

No comments:

Post a Comment