BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Jade_SAS
Pyrite | Level 9

Hi All,

 

    I'm copying one table from Teradata to the same location and I get the error below:

   

LIBNAME TD TERADATA SERVER=*** DATABASE=***;

 

Data TD.test1;

set TD.log;

Run;

 

ERROR: Error attempting to CREATE a DBMS table. ERROR: Teradata execute: Length 0 is not allowed for a CHAR, VARCHAR, BYTE, VARBYTE

column..

ERROR: ROLLBACK issued due to errors for data set TD.TEST1.DATA.

 

 

What's the possible reason for this? Thank you!

 

Jade

 

1 ACCEPTED SOLUTION

Accepted Solutions
Patrick
Opal | Level 21

@Jade_SAS

Additionally to what @kiranv_ wrote: Don't use a SAS data step to replicate a DBMS table. Using a SAS data step will most likely result in SAS first pulling all the data from the DB into SAS and then creating the new table and re-loading the data back to the DBMS.

 

Best use PROC SQL or eventually PROC APPEND. 

 

If it would be me then I'd use explicit pass-through SQL for such operations.

View solution in original post

2 REPLIES 2
kiranv_
Rhodochrosite | Level 12

do you have any character column with value of '' which is allowed in SAS but not allowed in Teradata after Teradata 14

Patrick
Opal | Level 21

@Jade_SAS

Additionally to what @kiranv_ wrote: Don't use a SAS data step to replicate a DBMS table. Using a SAS data step will most likely result in SAS first pulling all the data from the DB into SAS and then creating the new table and re-loading the data back to the DBMS.

 

Best use PROC SQL or eventually PROC APPEND. 

 

If it would be me then I'd use explicit pass-through SQL for such operations.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 3984 views
  • 1 like
  • 3 in conversation