Varchar(max) SQL Server

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
dstager
Participant
Posts: 47
Joined: Tue Jan 08, 2008 8:43 am

Varchar(max) SQL Server

Post by dstager »

Trying to write source column Varchar(max) to target Varchar(max) in SQL Server. There is error stating mismatch column length/size with truncation of data...

I have tried writing into SQL using LongVarchar (setting array sixe 1) but the error persists. Some incoming rows exceed the 8000 character length, so it's preferred we leave the character length to 'blank'.

Thanks in advance.
UCDI
Premium Member
Premium Member
Posts: 383
Joined: Mon Mar 21, 2016 2:00 pm

Post by UCDI »

its been a while but if I remember this right, sql server wanted nvarchar not long varchar for long strings. try that?
dstager
Participant
Posts: 47
Joined: Tue Jan 08, 2008 8:43 am

Post by dstager »

Yes - tried that...actually, that would further restrict the allowable size...
yugee
Participant
Posts: 34
Joined: Fri Feb 04, 2011 5:54 pm

Post by yugee »

Try: Set the jobs corresponding column type to LONGVARCHAR to a length of zero along with the Array size property to a value of 1.
dstager
Participant
Posts: 47
Joined: Tue Jan 08, 2008 8:43 am

Post by dstager »

After the field is loaded into a Varchar max column...the data seems to be truncated (missing) - no more runtime error...but the data is missing...
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

See my posts elsewhere about MAX_FETCH_BUFF.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply