HELP! Weird behavior when renaming column in query

HELP! Weird behavior when renaming column in query

am 05.11.2007 19:07:20 von Captain Jack Sparrow

I have a column in a table named "Hospice". I have a make table query
that pulls in this column but renames the column in the result to
"Hospice (Yes/No)". The column name in the resulting table is
"Hospice(Yes/No)", and the query design (after being saved) also shows
"Hospice(Yes/No)" as the alias for the new column. Both the query and
the resulting table remove the between the "e" in Hospice and
the open "(". Any ideas? TIA.

Re: HELP! Weird behavior when renaming column in query

am 05.11.2007 19:14:09 von Captain Jack Sparrow

Some additional info:

I have another column named "WorkingAged" that I rename to "Working
Aged (Yes/No)". That works just fine. So I tried adding an additional
space to the "Hospice" column by renaming it to "Hos pice (Yes/No)"
and that also works. So Access seems to object to only having ONE
space in the new name. Since I can't use the name "Hospice (Yes/
No), I do need to figure out how to make Access respect the correct
name.

Captain Jack Sparrow wrote:
> I have a column in a table named "Hospice". I have a make table query
> that pulls in this column but renames the column in the result to
> "Hospice (Yes/No)". The column name in the resulting table is
> "Hospice(Yes/No)", and the query design (after being saved) also shows
> "Hospice(Yes/No)" as the alias for the new column. Both the query and
> the resulting table remove the between the "e" in Hospice and
> the open "(". Any ideas? TIA.

Re: HELP! Weird behavior when renaming column in query

am 05.11.2007 20:35:20 von Salad

Captain Jack Sparrow wrote:

> Some additional info:
>
> I have another column named "WorkingAged" that I rename to "Working
> Aged (Yes/No)". That works just fine. So I tried adding an additional
> space to the "Hospice" column by renaming it to "Hos pice (Yes/No)"
> and that also works. So Access seems to object to only having ONE
> space in the new name. Since I can't use the name "Hospice (Yes/
> No), I do need to figure out how to make Access respect the correct
> name.
>
> Captain Jack Sparrow wrote:
>
>>I have a column in a table named "Hospice". I have a make table query
>>that pulls in this column but renames the column in the result to
>>"Hospice (Yes/No)". The column name in the resulting table is
>>"Hospice(Yes/No)", and the query design (after being saved) also shows
>>"Hospice(Yes/No)" as the alias for the new column. Both the query and
>>the resulting table remove the between the "e" in Hospice and
>>the open "(". Any ideas? TIA.
>
>
Just curious. If you open the table in design mode does it have a
Caption field set to some value?

Re: HELP! Weird behavior when renaming column in query

am 05.11.2007 21:38:45 von Captain Jack Sparrow

Nope.

Salad wrote:
> Just curious. If you open the table in design mode does it have a
> Caption field set to some value?

Re: HELP! Weird behavior when renaming column in query

am 06.11.2007 23:24:14 von Salad

Captain Jack Sparrow wrote:
> Nope.
>
> Salad wrote:
>
>>Just curious. If you open the table in design mode does it have a
>>Caption field set to some value?
>
>
I created Table4 with 1 field; Hospice type Yes/No

I then created a SQL statement to create Table5
SELECT Table4.Hospice AS [Hospice (Yes/No)] INTO Table5
FROM Table4;

Table5 is created and the field name is "Hospice (Yes/No)"

I then added a couple of fields to Table4 and reran a new SQL to create
Table5
SELECT Table4.ID, Table4.Something, Table4.Hospice AS [Hospice (Yes/No)]
INTO Table5 FROM Table4;

And it works fine. I did this with A97. I can test on A2003 if you'd
like. But you could test if you create a Table4 and have 3 fields; ID,
Something, and Hospice and then run the query.