Todd
I would still have to pass the "invalid" field name through to the back end (which it would choke on) for renaming "AS", or alternately, since this would rule out my using a WHERE clause, I could just select * and rename them as you suggest at my end. Because of the large size of the table I can't do this ... I really need that WHERE clause.
However, I got hold of the keeper of the data (used by a program written in a system called "Magic"), and miracles do happen. He is willing to change the field names. He says that he only accesses the fields by field number, not by name. To him, the field names are just comment fields. My problem is solved, but don't let this stop others with a more general solution from putting forth some ideas here.
Bob
>could you create your view or cursor or whatever with a command like
>
>select (am>order #) as am_order_no, anotherfield from mytable
>
>That will allow you to rename the local fields...
>
>>I have connected successfully, using ODBC, to some remote data. In my case its to Btrieve data, but that's not significant for this question.
>>
>>Most of the tables have "normal" field names and work fine. The tables I now have to access, have field names like the following:
>>
>>AM>Driver
>>AM>Order #
>>AM>Order Date
>>
>>My error message says that there is no such column. I saw an earlier thread (but can't currently find it) that talked about problems with the # character and had some sort of workaround. I seem to also be having trouble with the > character. I'm also confused as to how to handle imbedded spaces in the field names. I'm trying to do something like
>>SELECT * FROM TheTable WHERE (AM>Order #) = "12345"
>>
>>I don't have the option of having the field names changed in the remote data.
>>
>>Bob
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement