Thursday, April 14, 2016

Oracle Statement to extract fields that has numeric value

I have this data where users should input a description of profession. But one day, i found out that there are pure numeric entries. I need to query all record where PROFESSION column has numeric value.

Oracle Statement to extract fields that has numeric value

 SELECT EMPID, NAME, PROFESSION  
 FROM EMPLOYEE  
 WHERE REGEXP_LIKE(PROFESSION, '^[[:digit:]]+$')  

Tuesday, April 12, 2016

Add left and bottom border for iText Cell PDF

Code
So I have this PDF layout that a cell should have both left and bottom border. 
 PdfPCell row26cell_4 = new PdfPCell(row26Par_4);  
 row26cell_4.setBorder(Rectangle.BOTTOM);  
 row26cell_4.setBorder(Rectangle.RIGHT);  
 row26cell_4.setBorderWidth(.9f);  


Solution:
 PdfPCell row26cell_4 = new PdfPCell(row26Par_4);  
 row26cell_4.setBorder(Rectangle.RIGHT | Rectangle.BOTTOM);