05-15-2018 05:55 AM
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.
05-15-2018 06:13 AM
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).
05-15-2018 06:57 AM
05-15-2018 08:26 AM
How do you expect SAS (or any computer language) to run a character function like SUBSTR() on a numeric variable like BIGINT value?