SHOW US the actual code you are using. Just saying it didn't work tells us nothing. Also, how do you know this is a problem with the code? It could be that the TERADATA server is taking 20 minutes or more to do the extract.
Just 20 minutes? On your patience to work you need, young Padawan.
Seriously, check what is to be expected with that SELECT out of your database. Have a DBA run it with a simple count to see how many records/observations you will get. Multiply that with the observation size, and you will have an idea how much data you will move across the network.
@onyeajam wrote:
@Tom
I went back to original code and change the call to use a quoted string instead of a date literal . That does not work too. Endless running of the program
and t1.bene_fct_efctv_dt between input(&start_dt.,date9.) and input(&end_dt.,date9.)
and t1.BENE_FCT_OBSLT_DT >=input(&start_dt.,date9.);
QUIT;
%mend zip5;
%zip5 ("01JAN2019", "31DEC2019");
So you have solved this issue and are now on to a new issue. Please open a new thread to talk about how to optimize queries using remote databases. Here is a suggestion to try : It looks like you are joining two tables in your remote database so just use explicit passthru SQL to run the query on the database instead. In that case you will want to replace the hardcoded date values with values that work with the SQL dialect used by that database.
Its an endless running of the program after i removed the input statment in offeding lines. Thus I had to kill the program.
and t1.bene_fct_efctv_dt between &start_dt. and &end_dt.
and t1.BENE_FCT_OBSLT_DT >= &start_dt.;
QUIT;
%mend zip5;
%zip5 ("01JAN2019"d, "15JAN2019"d);
Where does library
nfpp_trd
point to?
Is the DISTINCT in the SELECT necessary?
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.