Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: DUplicate Value Insertion in database Problem

  1. #1
    Junior Member
    Join Date
    Mar 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy DUplicate Value Insertion in database Problem

    So here i have a database called expiringLicences which is filled with expiring licences as the software starts
    My problem here is ,it is inserting the same expiring licences over and over again as the software starts and my expiringLicences table is filled with duplicate values

    i have tried this code but this doesnt work

    String queryString="insert into expiringlicences(LicenceNo,LicenceDate,Balance,Num berOfDaysForExpiry)"
    + " select licenceno,licencedate,Balance,noofdaysforexpiry from importlicencedetails where noofdaysforexpiry<"+(90)+" AND expiringlicences.LicenceNo<>importlicencedetails.l icenceno";


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: DUplicate Value Insertion in database Problem

    Welcome to the forum! Please read this topic to learn how to post code in code or highlight tags and other useful info for new members.

Similar Threads

  1. Problem with a binary insertion sort method
    By kert666 in forum What's Wrong With My Code?
    Replies: 4
    Last Post: September 29th, 2013, 12:54 PM
  2. Store data from Excel to Database without duplicate values
    By vector_ever in forum What's Wrong With My Code?
    Replies: 5
    Last Post: August 1st, 2013, 04:12 PM
  3. Problem with connecting to DataBase
    By ocean1991 in forum JDBC & Databases
    Replies: 1
    Last Post: January 11th, 2013, 12:19 PM
  4. Java DataBase Connectivity Problem
    By sahilradotra in forum JDBC & Databases
    Replies: 1
    Last Post: May 8th, 2012, 07:46 AM
  5. Database connectivity problem-Oracle
    By Entrant in forum JDBC & Databases
    Replies: 3
    Last Post: October 11th, 2009, 10:08 AM

Tags for this Thread