vendredi 16 janvier 2015

Insert Partial Values from another table in Sql , and others manually

Before anyone gives me code of inserting values from other table to my table , i want to clearify i need partial values ...


I mean like i am making Admission Module in which after Student is admitted , from FeeDetail table details of payment are taken using his Class and his details ie scholarId etc from Input form . and an unpaid Invoice/FeeSlip is created.


I tried this code but does not works..



Insert into FeePayment(FeeID,TutionFees,LibraryFees,UniversityDevelopmentFees,UniversityStudentWelfareFees,SecurityDeposit,OtherFees,TotalFees,DueFees,FeePaymentID,ScholarNo,Class,TotalPaid)values(select FeeID,TutionFees,LibraryFees,UniversityDevelopmentFees,UniversityStudentWelfareFees,SecurityDeposit,OtherFees,TotalFees,TotalFees from FeesDetails where class='FYBCA','FD0001','ST101','FYBCA',0);


Error i get From Sql is


Error while executing SQL query: 5 values for 13 columns(Checked from Sql not Java)


Aucun commentaire:

Enregistrer un commentaire