truncation issue

ChristineMD

Board Regular
Joined
Jul 29, 2008
Messages
53
Very weird issue
I have a procedure that concatenates a bunch of fields together separated by html LI tags - the procedure itself works beautifully (someone shared some code with me here in 2008 that I modified for this purpose.)
I'm getting a very weird truncation issue though, with long values.

I have a MYSQL table tblTextCopy2015 with a bunch of individual columns for bullet data
I can use an ACCESS UPDATE query and use the procedure to populate a field with the concatenated bullet fields, and the results are fine, i.e. not truncated. This works:
Code:
UPDATE tbltextcopy2015 SET tbltextcopy2015.CONCBullets = StringTogether2([bullet1],[bullet2],[bullet3],[bullet4],[bullet5],[bullet6],[bullet7],[bullet8],[bullet9],[bullet10],[bullet11],[bullet12],[bullet13],[bullet14],[bullet15],[bullet16],[bullet17],[bullet18],[bullet19],[bullet20]);

but this does not (attributes is an Access table and the destination field is a memo field) This is an old 2003 database (mdb) but I use access 2010 now. (don't want to convert it!)
Code:
INSERT INTO attributes ( item, attributename, attribute )
SELECT MasterPROC.item, "Bullets" AS attributename, Last(StringTogether2([bullet1],[bullet2],[bullet3],[bullet4],[bullet5],[bullet6],[bullet7],[bullet8],[bullet9],[bullet10],[bullet11],[bullet12],[bullet13],[bullet14],[bullet15],[bullet16],[bullet17],[bullet18],[bullet19],[bullet20])) AS attribute
FROM MasterPROC INNER JOIN tbltextcopy2015 ON MasterPROC.item = tbltextcopy2015.Style
GROUP BY MasterPROC.item, "Bullets";

But this DOES work?
Code:
INSERT INTO attributes ( item, attributename, attribute )
SELECT MasterPROC.item, "Bullets" AS attributename, Last(tbltextcopy2015.concbullets) AS attribute
FROM MasterPROC INNER JOIN tbltextcopy2015 ON MasterPROC.item = tbltextcopy2015.Style
GROUP BY MasterPROC.item, "Bullets";

The attribute table is a setup table for an xml conversion where I have numerous other attribute name/values in addition to the bullets that feed into a node that's just attribute name and attribute value. Any insight would be greatly appreciated!
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
I'm not understanding your process exactly, but have run into truncation issues going between Access and Excel. Depending on how your data is going into Access, it may be truncated even if the destination field in Access is Memo.

If you are importing into an existing Memo field, your data will always be truncated at 255 characters no matter what. The only way I was able to get more than 255 is to import into Access to a new table, making sure to convert the field to Memo during the import process. (If the first few records don't have more than 255 characters, Access makes the field Text by default.)
 
Upvote 0

Forum statistics

Threads
1,223,791
Messages
6,174,603
Members
452,574
Latest member
hang_and_bang

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top