Guest User

Untitled

a guest
Jun 25th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. proc sql;
  2. connect to mysql(user = 'xxxxx' pass = 'xxxxx' server = 'localhost');
  3. execute(set @id = &id.) by mysql;
  4. execute(select (@lit:=image_text) from quality.links_image_text where image_id = @id) by mysql;
  5. execute(set @lidx = locate('ninja',@lit)) by mysql;
  6. execute(set @lidx2 = locate(' ',@lit,@lidx)) by mysql;
  7. execute(set @lidxd = @lidx2 - @lidx) by mysql;
  8. execute(set @lf = substr(@lit,@lidx,@lidxd)) by mysql;
  9.  
  10. create table asdf as
  11. select &id. as id, a as ws from connection to mysql
  12. (select @lf as a)
  13. ;
  14. disconnect from mysql;
  15. quit;
  16.  
  17. libname db <database> path=dbserver user=... password=...;
  18. proc sql;
  19. create table db.new as
  20. select * from db.largedata where flag=1;
  21. quit;
  22.  
  23. proc sql;
  24. connect dbase (server=dbserver user=... password=...);
  25. execute (create table db.new as
  26. select * from db.largedata where flag=1) as dbase;
  27. disconnect dbase;
  28. quit;
Add Comment
Please, Sign In to add comment