Thanks. I have a question:
For Update MyTable Set MyTable.FieldName = chr(32) & [FieldName]
When I put "MyTable.FieldName = chr(32) & [FieldName]" to the update to of
the update query for that FieldName, all of them change to text 0. Could you
help for that?
:
On Wed, 21 Mar 2007 15:46:05 -0700, Blinda wrote:
Hi all,
I would like to add a space in front of my text data.
Old data:
E6789
34567
12345
New data will be:
E6789
34567
12345
Please help for that. Thanks,
Blinda
A permanent change?
Back up your database table first.
As long as the field is Text datatype, you can run an Update Query:
Update MyTable Set MyTable.FieldName = chr(32) & [FieldName]
This is not do-able if the field is a Number datatype, as a space is
not a number.
I gave you the entire query SQL.
Don't use the QBE grid.
In Query Design View, click on the View + SQL View menu items.
When the SQL window opens type:
Update MyTable Set MyTable.FieldName = chr(32) & [FieldName];
Change MyTable to whatever the actual table name is.
Change FieldName to what ever actual name of the field is.
If the table or field name has a space in it, you must enclose the
name within brackets, i.e. [My Field].
Remember, this will only work if the [FieldName] datatype is Text.