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

Is there a way to pass a macro variable into SAP HANA? 

Normally you use double quotes around a marco in proc sql to resolve but double quotes define a column name in SAP HANA therefore it will not resolve correctly

 

this is  snip of the code. if i put double quotes around it than it read as a column name.

where

E."0UCOPERAND"="&OP_TYPE."

i have tried it without double quotes and it stll doesn't work.

 

Any ideas

 

1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

What does "doesn't work" mean? If SAP HANA insists on only accepting single quotes then try this:

E."0UCOPERAND"=%str(%')&OP_TYPE.%str(%')

View solution in original post

2 REPLIES 2
SASKiwi
PROC Star

What does "doesn't work" mean? If SAP HANA insists on only accepting single quotes then try this:

E."0UCOPERAND"=%str(%')&OP_TYPE.%str(%')
bibbnd
Fluorite | Level 6
I GET AN ERROR MESSAGE
ERROR: CLI prepare error: [SAP AG][LIBODBCHDB SO][HDBODBC] General error;260 invalid column name: TOUDEF: line 1 col 281 (at pos
280)
IT READS THE MARCO AS A COLUMN NAME

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 2 replies
  • 1105 views
  • 2 likes
  • 2 in conversation