>I'm assuming from your message you don't want to try SSIS - in SSIS 2012 I'm pretty certain this can be done.
>
>Update: I see Naomi referred to a prior post where this might have been done before.
Okay, this just came to me in a vision. I am iterating an array latables. I also have a dbf tablesql with tablename and sql (M) where I am putting the select string I build to get the data into a cursor that will then be used to create the COPY TO
I am checking the data type of each field and adding it to the SQL statement accordingly ( dates and datetimes transformed with TTOC() etc)
The primary key of eveyr table is a UID.
My thought is for M data type, if the length of the memo is > 254, instead of selecting the contents of the memo (with placeholders for CHR(13)+chr(10)) to in the select statement I put a symbol of somekind + column number ( I am iterating the laflds ) .
For every row where there is a memo > 254 I write it out to a txt file named GUID+column number
once I have all that in SQL, any VARCHAR(MAX) with the symbol will read a textfile named PK+(code in imported memo data) +.txt into the column for that row.
Should be pretty easy to write.
Will report back
Charles Hankey
Though a good deal is too strange to be believed, nothing is too strange to have happened.
- Thomas Hardy
Half the harm that is done in this world is due to people who want to feel important. They don't mean to do harm-- but the harm does not interest them. Or they do not see it, or they justify it because they are absorbed in the endless struggle to think well of themselves.
-- T. S. Eliot
Democracy is two wolves and a sheep voting on what to have for lunch.
Liberty is a well-armed sheep contesting the vote.
- Ben Franklin
Pardon him, Theodotus. He is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.