String date="03-12-2010";
String query = "select TOTAL_SUBS, ACTIVE_SUBS,NEW_SUBSCRIPTION, ONE_WEEK_RENT,TWO_WEEK_RENT,THREE_WEEK_RENT,SUBSCRIPTION ,RBT_PURCHASE,RBT_GIFT,TOTAL_CALL_PULSE ,SMS , ((NEW_SUBSCRIPTION_AMOUNT+ONE_WEEK_AMOUNT+TWO_WEEK_AMOUNT+THREE_WEEK_AMOUNT+SUBSCRIPTION_AMOUNT+TOTAL_PULSE_AMOUNT+SMS_AMOUNT)/2+(RBT_PURCHASE_AMOUNT+RBT_GIFT_AMOUNT)/4)/USD_RATE as REVENUE from daily_invoice where invoice_date like '"+date+"%'";
java.sql.PreparedStatement pstmt = con.prepareStatement(query);
java.sql.ResultSet rs =null;
rs = pstmt.executeQuery(query);
while( rs.next() )
{
System.out.println("yeppie 111 have data");
}
========================================
hi every one i have following problem,
if i am running this query in database there is one entry corresponding to this query means it is running successfully
but when i am running this query with my
java program i got "EMPTY RESULTSET".
means i am not able to get print string "yeppie 111 have data"
i have tried many solution please help me
thanks to all members in advance