Re: "Numeric->Text" Type conversion in "Make Table" Query
From: John Spencer (MVP) (spencer4_at_comcast.net)
Date: 04/14/04
- Next message: Paul James: "Re: Simple Multiplication"
- Previous message: Kent: "Re: Use a query as an email distribution list"
- In reply to: TDN: ""Numeric->Text" Type conversion in "Make Table" Query"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 14 Apr 2004 13:46:09 -0400
You might try the CStr conversion function. You will get an error on that if
Country is a null, but that can be handled. If country can be null then I would
try IIF(Country is null, Null, CStr(Country)). If Country is never null, then
CStr(Country) should work.
SELECT IIF(Country is null, Null, CStr(Country)), OtherFields
FROM ...
TDN wrote:
>
> Hi,
>
> been looking hours for a sloution but without success.
> maybe anyone can help:
>
> task:
> a "Make Table" query shall create a table with mostly text
> fields, but the original table contains several numeric
> fields (that access 97 sometimes imports as text fields!).
>
> the "make table" query uses the command
> SELECT Str(COUNTRY) as COUNTRY;
>
> problem:
> the type conversion works fine if COUNTRY is a numeric
> field. but unfortunately, access sometimes sets the field
> type to "text" during import with the result that the Str
> ()-fuction produces an error and ignores al data.
>
> QUESTION:
> is there a way to create a new field of the type "Text" in
> a make table query no matter what the source field type is?
>
>
> been looking on the web for 3 hours now, without success.
> it cant be that noone ever encountered this issue...
>
> any comments really appreciated.
>
> thanks
>
> TDN
- Next message: Paul James: "Re: Simple Multiplication"
- Previous message: Kent: "Re: Use a query as an email distribution list"
- In reply to: TDN: ""Numeric->Text" Type conversion in "Make Table" Query"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|