Re: Change SQL to allow Memo format rather than only 255 character tex

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Can you build the table first? Then you can define the field type etc.

Using a MakeTable query, I'm not sure you can force the data type to a memo field.

THe Mid function is causing the truncation in this make table query.
Solution one.
Just import the field as is and then use an update query to trim off the first 10 characters.

SELECT (Select Max(ID) from 01_LCControl where ID<tbl.ID) AS ID
, [Field1] AS Contents
INTO 15_Contents
FROM [Mod Data] AS Tbl
WHERE (((Tbl.Field1) Like "Contents:*"));

UPDATE 15_Contents
SET Contents = Trim(Mid([Contents],10))

Solution two
Design the table first and specify the field type as memo
Then you can use an append query to add data and if you need the table cleared, use a delete query to clear out all the records.

I know of no way to force the memo field type in the destination table if you are going to manipulate the memo field in the Select statement.


'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================


Pete wrote:
The following SQL seems to cut my Memo text to fewer characters. My knowledge is too thin to recognise which part is doing it. Help would be much appreciated. The ID part is Ok, the problem lies in Field1. Thanks

SELECT (Select Max(ID) from 01_LCControl where ID<tbl.ID) AS ID, Trim(Mid([Field1],10,Len([field1]))) AS Contents INTO 15_Contents
FROM [Mod Data] AS Tbl
WHERE (((Tbl.Field1) Like "Contents:*"));

.



Relevant Pages

  • Re: Access: getting chinese (?) character unexpectedly, why?
    ... No it was not concatenated query but yes it was a memo field, ... I tried changing Group By ... Memo to Text as field type and the problem is solved. ...
    (comp.databases.ms-access)
  • Re: where to find column name and properties in system tables in a
    ... Allen Browne - Microsoft MVP. ... I do a lot of query manipulation of linked ... I know it has a print statement, ... names and properties like length, field type, etc. ...
    (microsoft.public.access.tablesdbdesign)
  • Re: MySQL Speed
    ... less resource intensive for MySQL. ... $query = mysql_query; ... Field Type Null Key Default Extra ... time timestamp YES CURRENT_TIMESTAMP ...
    (comp.lang.php)
  • Re: Adding Days to a Date
    ... MS Access MVP ... The only way I am able to do this is to change the field type to ... > date/time after I transfer the data and run the above-mentioned query. ...
    (microsoft.public.access.queries)
  • linking 2 tables
    ... I have created 2 tables with Txn_IDA for Tbl A and Txn_IDB for Tbl B and ... the field type is of ReplicationID. ... I have created a query that tries to link using these 2 fields but it ...
    (microsoft.public.access.modulesdaovba)