---
title: "Add a zero to the returned value if there is no zero"  
description: "Add a zero to the returned value if there is no zero"  
author: "Anonymous User"  
published: 2013-07-08  
updated: 2013-07-08  
canonical: https://www.mindstick.com/forum/1264/add-a-zero-to-the-returned-value-if-there-is-no-zero  
category: "mssql server"  
tags: ["mssql server"]  
reading_time: 1 minute  

---

# Add a zero to the returned value if there is no zero

Hi [Developers](https://www.mindstick.com/articles/12875/blunders-you-must-avoid-while-hiring-java-developers-to-get-the-best-fulfilling-your-needs)!\
The following [query returns](https://www.mindstick.com/forum/159429/sql-query-returns-a-timeout-expired-error) the following [sample data](https://www.mindstick.com/forum/159310/write-a-node-js-script-to-seed-your-mongodb-database-with-sample-data) from my db.\
[select](https://www.mindstick.com/forum/160534/orderby-then-select-vs-select-then-orderby-performance) mobilenofrom Personsample [results](https://yourviews.mindstick.com/story/4497/usage-of-baking-soda-magical-results):\
77562365507589565560756899955777325656\
How can I [add](https://www.mindstick.com/forum/12983/add-address-in-textbox-when-page-is-load-and-if-i-search-address-in-textbox-show-in-map-by-javascript) a 0 in front if there is no 0 in the returned [values](https://www.mindstick.com/forum/327/sum-textbox-values)?\
Thanks in advance. \

## Replies

### Reply by AVADHESH PATEL

Hi,\
Try as following \

```
SELECT CASE LEFT(mobileno,1)     WHEN '0' THEN mobileno    ELSE '0' + mobileno    endFROM Person 
```


---

Original Source: https://www.mindstick.com/forum/1264/add-a-zero-to-the-returned-value-if-there-is-no-zero

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
