Page 1 of 1

Field length more than 8000

Posted: Tue May 14, 2019 12:50 am
by sainath
Hi
I have incoming varchar field which is more than 8000
What data type I should define in data stage and corresponding
Data type in sql server


Thks

Posted: Tue May 14, 2019 10:00 am
by chulett
What is the "corresponding data type in SQL Server"?

Posted: Tue May 14, 2019 2:24 pm
by mouthou
You positioned a question such that it is about exceeding the length of string data types (MAX is 8000 as we see).

As Craig mentioned and as you know, your choice of data type in DS is usually based on the data type defined in DB table. But in this case,as its about the maximum in which SQL Server DB might have defined with varchar(MAX), you could try LONGVARCHAR in DS. I haven't tried LONGVARCHAR with that much string length but if it is critical for you, you could contact IBM support for applicable patches to make LONGVARCHAR work.

Posted: Wed May 22, 2019 5:02 am
by yugee
I would suggest you import the table metadata in DataStage and see how the column you are referring is defined. Based on that, if you see the length is not sufficient, you can define the column as LONGVARCHAR and don't give the length. In most of these cases, you can try different definitions and you will be able to figure out the solution.