Hi everyone, I am working on a project where I need to insert SAP data into a vendor SQL Server database. To do so, my script will need to read a pipe delimited file down, do lookups in multiple other tables, and insert new rows into three tables. Most of the data I need uses normal tables with a key so it is pretty easy. However, one of the configuration tables needed uses a field that has an image field type. The field contains hex code. The hex string in each is over 8000 characters. I can't find a good way to parse this field out, though. Somehow, when the application users make changes or add a new record, it stores it in hex format which seems crazy but I confirmed this with the vendor. I can only guess that other languages do this more easily than TSQL. I have tried many variations of convert or cast to do this but am coming up empty.
This website<https://www.csoft.co.uk/developer/support/hex-converter> does an ok job of converting the string but it has a bunch of garbage in it. So, using this list<http://www.theasciicode.com.ar/ascii-table-characters.pdf>, I created a little FoxPro program to read two characters at a time and store this to a variable. I could duplicate this using TSQL if it worked. Anyway, doing this is a little better than the converter sites but still not really useable. There are codes like: NULL, BEL, STX, ACK, SOH, STX, EOT, BS, HT, etc. that I'm not sure what to do with. I tried putting a space or dash in for these but that does not help. I would like to parse this hex string into a new table. Any suggestions? --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/mwhpr1101mb2109862f42dd9b92d52e306d9c...@mwhpr1101mb2109.namprd11.prod.outlook.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

