RATE THIS ANSWER
0
Click to Vote:
0
0
Last Answered:
May 28 2008 2:27 PM GMT
by Jlanus
Hi,
You could "move left" the field into a character field (MOVEL) in RPG or right trim RTRIM in SQL
Regards,
Martin Gilbert.
The SQL Server is self doesn't provide a way to do this. You'll need to handle this alignment with the client application which is displaying the data. Most client development tools have a way to align the data to the left within the textbox or field.
Or, convert it to a string with a scalar function on SQL server.
SELECT CAST(price AS VARCHAR)
Once converted it will align left.
Note that you might need to give it a name using the AS keyword if it displays under a weird column heading.
SELECT CAST(price AS VARCHAR) AS "Price_"
An issue remains: how will SQL Server edit the number? I didn't find a function for this purpose.
--
Juan Lanus