mrchonginhk
Well-known Member
- Joined
- Dec 3, 2004
- Messages
- 679
Suppose I have a field in the table called FName.
This field is of length that is 20 char max in data.
So some records are just 10 char, some 12, but max is 20.
I need to run a query so that FName becomes always 20 char long
For data with char less than 20 long, I need to insert number of spaces behind the FName in table so that it makes up to 20 char long in the output query.
What is the SQL to do this ?
For example
If the data is
"12345678901234567"
Then it should become
"12345678901234567 "
ie adding 3 space behind.
I must use SQL and not VB.
Thanks
This field is of length that is 20 char max in data.
So some records are just 10 char, some 12, but max is 20.
I need to run a query so that FName becomes always 20 char long
For data with char less than 20 long, I need to insert number of spaces behind the FName in table so that it makes up to 20 char long in the output query.
What is the SQL to do this ?
For example
If the data is
"12345678901234567"
Then it should become
"12345678901234567 "
ie adding 3 space behind.
I must use SQL and not VB.
Thanks