Re: Append to SQL Server
- From: John Spencer MVP <spencer@xxxxxxxxx>
- Date: Thu, 09 Apr 2009 15:35:39 -0400
I have not seen that behavior before. Are you sure that the SQL field is defined as VarChar and not Char?
IF it is varChar then perhaps you can use the Trim or RTrim function on the memo field in the query. It is possible that the Access memo field does contain trailing spaces depending on how the data got into the memo field. Typing in the data will automatically remove any trailing spaces, but importing from another source that does have the spaces at the end or using code or an insert or update query will keep trailing spaces.
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
Sash wrote:
I have a SQL Server linked table in Access and I'm running an append query to populate this table. It works fine except if the field has 10 characters, 245 blank spaces are put at the end in SQL Server. The columns are set-up as VarChar in SQL Server and are a memo field in Access. The reason they are a memo field is that this field could contain 9 characters or 255 characters. However, I do not want SQL Server to consistently be 255 characters with blank spaces at the end..
The Access data truly does not have spaces at the end.
- References:
- Append to SQL Server
- From: Sash
- Append to SQL Server
- Prev by Date: RE: How do you make a Query that shows records even if a field is
- Next by Date: Make a query sort by last name in ascending order
- Previous by thread: Append to SQL Server
- Next by thread: Re: Append to SQL Server
- Index(es):
Relevant Pages
|