1

I want to get the value from postgresql with formating. The formatting is user option like they want comma separator or not and with decimal place is 2,3 or 4 like.

So now i wrote query like this.

 Select to_char(rate,'FM999.00') as BasicSaleRate from table1

Its return ans 220.00. How to write the query with comma separator value like this '#,0.00'. That means the value more than thousands return with comma separator or not.

Am using postgresql 9.3

Thank you

1 Answer 1

2

See this reference http://www.postgresql.org/docs/9.3/static/functions-formatting.html to_char(rate,'FM999,999.00')

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.