On Sat, 24 Jan 2009 02:27:53 -0800 (PST),
(E-Mail Removed)
wrote:
>On 24 jan, 02:50, John W. Vinson <jvinson@STOP_SPAM.WysardOfInfo.com>
>wrote:
>> On Fri, 23 Jan 2009 14:45:43 -0800 (PST), geert.van.ransbe...@telenet.be
>> wrote:
>>
>> >Hello
>> >I just imported a csv-document into an new access table.
>> >Every fieldname has been correctly imported except for one. In this
>> >field I need a text field instead of a number. The data is like
>> >09078978979, 09077879000, etc... so it is logical he detects it as a
>> >number leaving the first 0. For me it's important that the first 0
>> >doesn't disappear. Text datatype would be ok. How can I preserve the
>> >0, so how can I change this field into text by code.
>> >thabks a lot for your suggestion.
>>
>> >kind regards
>> >geert
>>
>> Your problems may be worse than you think: Long Integers are limited to 2^31,
>> two billion odd - and your numbers are bigger than that. What is the datatype
>> of the imported field?
>>
>> Piet's suggestion is right on the mark - *link* to this CSV file and run an
>> Append query into a predefined table with the appropriate datatypes.
>> --
>>
>> * * * * * * *John W. Vinson [MVP]
>
>Thanks a lot but how can I append my lost 0 to this new table?
You can run an Update query updating the field to
Right("00000000000" & [fieldname], 11)
to append eleven zeros to the start of the field, and then take the last
eleven bytes of the result; this will append zero, one, two or however many
leading zeroes are needed.
--
John W. Vinson [MVP]