DATA Step, Macro, Functions and more

Invalid field size for datatype ERROR when appending to SQL table

Reply
Super Contributor
Posts: 326

Invalid field size for datatype ERROR when appending to SQL table

I have a dataset extracted from a SQL table which contains nvarchar(max) fields. My DBMAX_TEXT is set to 32000 and bulkload for the libname is set to YES.

 

When I writeback to another SQL table, I get the error "Invalid field size for datatype".

 

I actually saw an old post asking a similar question but seems left unanswered.

 

https://communities.sas.com/t5/General-SAS-Programming/How-to-load-large-text-fields-into-SQL-Server...

 

Appreciate any resolution into this issue.

 

Thanks!

PROC Star
Posts: 1,760

Re: Invalid field size for datatype ERROR when appending to SQL table

Do you get no error if DBMAX_TEXT=8000 but you get an error with 8001, as implied in the other post?

 

 

Ask a Question
Discussion stats
  • 1 reply
  • 76 views
  • 0 likes
  • 2 in conversation