Thursday, April 18, 2013

Select Nth Row From A Table In Oracle

Original link:
http://stackoverflow.com/questions/4509167/select-nth-row-from-a-table-in-oracle


select * 
  from ( select a.*, rownum rnum
           from ( YOUR_QUERY_GOES_HERE  ) a
          where rownum <= N_ROWS )
 where rnum >= N_ROWS

Monday, April 8, 2013

Search a string in clob ---ORACLE

replace table_name, column_name and string

select * from table_name where dbms_lob.instr(column_name,'string')>0;

Thursday, April 4, 2013

Eclipse auto save before run

Here has the correct answer:

http://stackoverflow.com/questions/2943122/eclipse-auto-save

The second one is correct:

if 

Window -> Preferences -> General -> Workspace and there you can check "Save automatically before build" + "Build automatically" 

don't work try this 

Preferences -> Run/Debug -> Launching -> "Save dirty editors before launching"

Monday, April 1, 2013

Compile and run Java in vim

The is the original post in stackoverflow:

http://stackoverflow.com/questions/6411979/compiling-java-code-in-vim-more-efficiently

I added two lines to it:

F12 can jump out of quickfix mode
F8 can run the java program

vimrc:


autocmd Filetype java set makeprg=javac\ %
set errorformat=%A%f:%l:\ %m,%-Z%p^,%-C%.%#
map <F9> :make<Return>:copen<Return>
map <F10> :cprevious<Return>
map <F11> :cnext<Return>
map <F12> :ccl<Return>
map <F8> :!java %:r<Return>