Sorry guys, my PC have been half to death all day and I couldn´t test your adviced. I'm trying to sent a the query to Oracle server but I recive an error like this "ERROR: PROC SQL requires any created table to have at least 1 column." 96 options fullstimer; 97 options sastrace=',,,s ,,d, ,,t,' sastraceloc=saslog nostsuffix; 98 99 proc sql; 100 connect to odbc as oracle (USER=aaaaaa PW=XXXXXXXX DSN='pppp'); 101 create table result as select * from connection to oracle 102 (select a.var1, a.var2, a.var3, a.var4, a.var5, 102 a.var6, a.var7, a.var8, a.var9, a.var10, b.var1, b.var2 104 from epi as a left join blas b on (a.var1 = b.var1) 105 where a.var1 <= date and a.var2 >= date and 105! a.var3>date); ERROR: PROC SQL requires any created table to have at least 1 column LinusH, both datasets are in the work library, I copy it from a DWH in Oracle server. Thanks for the link Jaap, It's very helpful for me. One more thing, I haven`t permissions for create, modify or alter tables in the Server so all the tables that I create should be in the local drive Regards
... View more