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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 522 views
  • 0 likes
  • 3 in conversation