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.

 

 

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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