Hello,
i am getting this error if i do for example a substr(xx,1,4) AS xx2.
I implemented the code in a prompt associated with an EG programm file, and it doenst work with BIGINT, table gets not created...but it does work on an other colum(VARCHAR), with the same error.
The BIGINT column code works on a same generated prompt in a stored process and the log doenst show me the error (didnt tested if the VARCHAR works, but i assume it works too).
So im a bit confused?! How to clean the errors on the normal EG project programm and get this work with the BIGINT column?
I tried it with %sysfunc(%quote(substr(xx,1,4) AS xx2)) but that doesnt work.
Just to understand, i put the whole substr(xx,1,4) AS xx2 in the prompt (unformated value), its in a static list and then i chose the value(formated displayed value) and take the function behind it, in this case the substr...
This works in a stored process with a simple prompt, but not 100% in a normal SAS EG promp associated with a program.
Stored processes and EG Prompts are two very different things. EG prompts are (as far as I can remember) only there to create macro variables with some data as chosen by the user, so putting code in there is not really going to work - nor is it a very good idea in the best of cases as it could seriously impact the integrity of your system (its called SQL injection).
How do you expect SAS (or any computer language) to run a character function like SUBSTR() on a numeric variable like BIGINT value?
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.