Proc Append will hit Invalid Precision Error to NVARCHAR(MAX) column

Reply
Frequent Contributor
Posts: 80

Proc Append will hit Invalid Precision Error to NVARCHAR(MAX) column

Hi Guys. I am using SAS Data Integration Studio 4.902 to do ETL jobs.

 

Recently, there is a column that requires to change to 5000 characters from 2000.

I am using Microsoft SQL and SAS DI is connected through ODBC Driver.

 

My column in SQL is nvarchar(MAX) and if i do Append in Table Loader, I will get this error:

 

ERROR: Error binding parameters: [Microsoft][SQL Server Native Client 11.0]Invalid precision value

I did some checking online but there are 2 "solutions" suggested:

1) set bulkload=yes in libname statement(Doesn't work)

2) use NCHAR(MAX) as NVARCHAR(MAX) only allows up to 4000 words.

 

May i know if there is alternative solution?

PROC Star
Posts: 2,128

Re: Proc Append will hit Invalid Precision Error to NVARCHAR(MAX) column

Posted in reply to imdickson

A bit confused here. Dont you need to change type the field in SQL server? 

Frequent Contributor
Posts: 80

Re: Proc Append will hit Invalid Precision Error to NVARCHAR(MAX) column

It's Ok.
What i meant was that nvarchar(max) in SQL does not support more than 4000 words. What i did was change to NTEXT in SQL and it works like a charm.
Ask a Question
Discussion stats
  • 2 replies
  • 76 views
  • 1 like
  • 2 in conversation