Posts

Showing posts from September, 2015

How to fetch large size XML document values by StaX using Java?

package com.main.File; public class BulkFileSeparationReader {     public static void main(String[] args) throws ClassNotFoundException {         String fileName = "combine.xml";                List<BookSpecBean> bookspec2 = (List<BookSpecBean>) parseXML2(fileName);         for(BookSpecBean bean : bookspec){ //          System.out.println(bean.recordreferencechar); //           System.out.println(bean.pricetypecodechar); //          System.out.println(bean.priceamountchar); //          System.out.println(bean.currencycodechar); //          //          System.out.println(bean.toStr...

How to fetch particular values from a column among different values?

If you are having a table named Status_details TABLE NAME :Status_details OrderId      EmployeeName    EmployeeId          Status                 BillingNumber  Date 101              Selvan                     120021           Hand Delivery      CTS02153     2015-07-01 102              Selvam                    120022           Dispatched           CTS02154...

how to take date exactly older than 30 days in mysql?

If you want to take the date exactly older 30 days in mysql database If your current date is 4/09/2015 You want the record older than 30 days then the 30th day date is 05/08/2015 mysql> Select * from table_name where current_date() - INTERVAL 30 DAY; IF YOU GIVE LIKE THIS YOU WILL GET THE EXACTLY THE 30 DAY . SUPPOSE YOU WANT THE LIST OF ALL THE RECORDS THAT ARE 30 DAYS OLDEER. FOR THAT MYSQL> SELECT * FROM table_name where receiveddate < date_sub(now(), INTERVAL 30 DAY) This will dispaly all the records that are 30 days older. Hope this post will help someone around the world. Thank you......