BookmarkSubscribeRSS Feed
Gangi
Obsidian | Level 7

I have table able called ABC in database with column names as A,B,C,D,E. Out of these columns B column has data in XML format.

when I tried to import data from datsabse using PROC SQL it the throwing an error,

"ERROR: At least one of the columns in this DBMS table has a datatype that is not supported by this engine."

 

4 REPLIES 4
ChrisNZ
Tourmaline | Level 20

You have to cast the type XML to VARCHAR in a pass-through query.

Gangi
Obsidian | Level 7

I tried using cast(B as VARCHAR), I got the error as 

Teradata prepare: Syntax error, expected something like '(' between the 'VARCHAR' keyword and ')'

 

I also tried defining the length Varchar(10000) but still I got the error.

 

Thank you,

ChrisNZ
Tourmaline | Level 20

> Syntax error, expected something like '(' between the 'VARCHAR' keyword and ')'

 

means there is something missing here:

 

cast(B as VARCHAR     HERE       )

 

which is, at the message reads  between the 'VARCHAR' keyword and ')'

 

and which is, at the message also reads  something like '('

 

more specifically something like (100).

 

 

> I also tried defining the length Varchar(10000) but still I got the error.

 

Surprising. Post the complete log please.

 

 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 763 views
  • 0 likes
  • 3 in conversation