Minggu, 21 Juli 2013

RE: [MS_AccessPros] convert numbers to text

 

It would help to know the table and field names and data types. If the field containing the number is actually text and can hold 6 or more characters, you could try something like:

UPDATE tblYourTable
SET YourField = Choose(Val(YourField),"Dollar","Euro","Pound")

I would make sure your database is backed up prior to performing any batch update.

Duane Hookom MVP
MS Access

----------------------------------------
> To: MS_Access_Professionals@yahoogroups.com
> From: no_reply@yahoogroups.com
> Date: Sun, 21 Jul 2013 13:25:40 +0000
> Subject: Re: [MS_AccessPros] convert numbers to text
>
> thanks.
> I know we could do that using a middle table but i am asking how to do that without creation for another table as we use one update query with one criterion using some functions like (if-else).
> could we do that?
>
> --- In MS_Access_Professionals@yahoogroups.com, Duane Hookom <duanehookom@...> wrote:
>>
>> I tend to use tables :-)
>>
>> Create a small table [tblCurrency] with a primary key numeric (or text if your number is text) field [CurrID] and a text field [CurrName]. Then add the records:
>>
>> 1 Dollar
>> 2 Euro
>> 3 Pound
>>
>> You can then use this table with your original table in an update query. Update your numeric fields with the value from CurrName.
>>
>> Duane Hookom MVP
>> MS Access
>>
>> ----------------------------------------
>>> From: no_reply@yahoogroups.com
>>>
>>> Hi:
>>> I have a column includes the value either 1 or 2 or 3, and I want to
>>> convert 1 to "Dollar",2 to "Euro", and 3 to "Pound".I know how to use an
>>> update query with one criterion so I need three update queries. How
>>> could I use one update query to accomplish theses transactions as a
>>> batch.
>>> Thanks
>>> note: using access 2003

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (4)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar