Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

fatal database postgres does not exist

If the field is already a string, this will work

 SELECT RIGHT('000'+ISNULL(field,''),3)
If you want nulls to show as '000'

It might be an integer -- then you would want

 SELECT RIGHT('000'+CAST(field AS VARCHAR(3)),3)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #fatal #database #postgres #exist
ADD COMMENT
Topic
Name
9+3 =