Re: ***Trimming field data*** Reposted
Posted in 1995
> deanh@Unipalm.Pipex.Com (Dean hobbs) writes: > I have an Informix database with a character field called ACC_NAME that > can be upto 10 characters. I have attached the table to an access > database and when I view the field in data view the ACC_NAME field is > right filled with spaces. Ours are too. There must be a defect somewhere. Is it in I-Net, ODBC, MS-Access? I don't know for shure. Somebody should find out and fix it though. This probably is viewed by Informix as an uninteresting problem. Although they are wrong if this is the case, I wouldn't realy expect them to do anything. (They do have other more important tasks to do!) I don't know if this is a problem with other databases. If it is Microsoft might show some interest in it. The ODBC vendor might be your best bet? This is a fun world :((( If we use Visual Basic to select data from an Informix database (via ODBC) and insert it directly into an Access table we see the same results. > If I try and link this field to an ACC_NAME > field in an access table that does not have spaces right filled, there is > obviously no matches. When we do the same we do get a match (in a tiny test we did using MS-Access version 2.0 and Informix CLI ODBC). > I am fairly new to Informix but in other databases > I have used you can usually trim off the spaces so that there are none on > the end of the field. An SQL RDBMS has fixed length fields if they are defined as char(x). There has to be spaces (or some other markers) at the end inside the database. > I have tried using SELECT TRIM(Acc_Name) as suggested by Craig but it says > TRIM function not found. Havent tried this. What do you mean rely. When you attatch an Informix table to an MS-Access database there is no select involved. May be you could get this to work via a "query" in MS-Access? As we only use MS-Access for ad hoc queries this hasn't been a significant problem for us yet. Nils.Myklebust@ccmail.telemax.no NM-data, Dalsbergstien 7, N-0170 Oslo, Norway My opinions are those of my company