Search:

Type: Posts; User: newbie2

Page 1 of 13 1 2 3 4

Search: Search took 0.04 seconds.

  1. Re: Another complicated query but perhaps possible

    Mr. Zvoni
    Another requirement if possible
    In addition to the code retreiving the students who have not completed their payments,
    I need another code that query for those who have not completed...
  2. Re: Another complicated query but perhaps possible

    You made me feel happy.
    Thank you very much for your generosity
  3. Re: Another complicated query but perhaps possible

    Zvoni
    I'm so grateful to you
    I managed to retrieve the students whose RemainingSubjectPrice= 0 with my code in my last post.
    I even tested your code and it is working perfect.
    My main ptoblem...
  4. Re: Another complicated query but perhaps possible

    I tried this code , it seems to work but there is a problem.


    StrSql = " WITH " & _
    " SC AS ( SELECT SC.Student_ID, ST.ID,SC.Class_ID, SC.NumOfSessions,SC.Price," & _
    ...
  5. Re: Another complicated query but perhaps possible

    Hello Zvoni
    Sorry sir to bother you again
    I was absent for a couple of weeks and now I'm back to my project.
    I want to ask if it is possible to get rid of the field "Paid" and to retrieve the...
  6. Re: Another complicated query but perhaps possible

    Million thanks sir
  7. Re: Another complicated query but perhaps possible

    I created a new database and used the initial insertion codes and changed some data to make prices equal to payments and it worked properly.
    I think I need to check my own database.
    But what is...
  8. Re: Another complicated query but perhaps possible

    Is there something I would do?
  9. Re: Another complicated query but perhaps possible

    Zvoni
    Sorry to disturb you again
    This code is showing only one record.
    I have three teachers who have completed their payments but only the first teacher is retrieved.
    When I examine the code,...
  10. Re: Another complicated query but perhaps possible

    Sorry I didn't notice that we have moved to page 3

    No they are true tables
    I can even check in some sqlite tools and I could see that:
    FOREIGN KEY("Class_ID") REFERENCES...
  11. Re: Another complicated query but perhaps possible

    I dropped the tbl_student_class and created a new table using this code but
    I still can delete a record in tbl_teacher_subject that has an entry in tbl_student_class.

    CREATE TABLE...
  12. Re: Another complicated query but perhaps possible

    Zvoni
    thank you very much
    I'm following your guidelines but I still can delete records in tbl_teacher_subject though they have reference in tbl_student_class.
    Of course I can't do that manually,...
  13. Re: Another complicated query but perhaps possible

    Hello Zvoni
    I've just noticed an issue.
    I think that the "tbl_teacher_subject" should have the "ID" field AUTOINCREMENT .
    Let's imagine this scenario:
    Teacher "X" has been attributed (Class_ID 2...
  14. Re: Another complicated query but perhaps possible

    I think I got it but I need your confirmation

    WITH
    SC AS (SELECT SC.Class_ID, SUM(COALESCE(SC.Price, S.SubjectPrice)*SC.NumOfSessions) As TotalPrice,
    ...
  15. Re: Another complicated query but perhaps possible

    Thank you very much sir
  16. Re: Another complicated query but perhaps possible

    Hello Zvoni
    I need to retrieve the teachers who have completely received their pays.
    For that I used this code but it doesn't seem to work properly.

    WITH
    SC AS (SELECT SC.Class_ID,...
  17. Re: Another complicated query but perhaps possible

    The the "100" is coming from the table subject
    I sent the wrong code.
    I fact in my original code, the student price is set to null
    I think I need some time to concentrate carefully.
    Perhaps due...
  18. Re: Another complicated query but perhaps possible

    Dim sSQL As String
    DBFile = App.path & "\Example2.db"
    Set Cnn = New RC6.cConnection

    If Dir(DBFile, vbNormal) = vbNullString Then
    If Cnn.CreateNewDB(DBFile) = False Then
    ...
  19. Re: Another complicated query but perhaps possible

    Dim sSQL As String
    DBFile = App.path & "\Example.db"
    Set Cnn = New RC6.cConnection

    If Dir(DBFile, vbNormal) = vbNullString Then
    If Cnn.CreateNewDB(DBFile) = False Then
    ...
  20. Re: Another complicated query but perhaps possible

    I'm sorry sir I'm still having trouble.
    I can't figure out where the problem is.

    SQL = SQL & sCTE & ") UPDATE tbl_student_class As TSC SET Paid=CTE.CalcPaid FROM CTE WHERE CTE.ID=TSC.ID"
    Set Rs...
  21. Re: Another complicated query but perhaps possible

    Zvoni
    I'm getting error in misplacing the bracket ")"
    Cannot compile Select statement ")" : syntax error



    Dim sCTE As String
    Dim sLJ As String 'For the LEFT JOIN
    Dim sIJ As String 'For...
  22. Re: Another complicated query but perhaps possible

    Zvoni Excuse me
    I'm getting crasy to make the last code working.
    I spent a whole night trying to understand the code.

    StrSql = "WITH " & _
    " CTE AS (SELECT SC.ID,...
  23. Re: Another complicated query but perhaps possible

    You are so generous
    Million thanks sir
  24. Re: Another complicated query but perhaps possible

    Zvoni
    Thank you very much for the very sophisticated code .
    It worked like a charm.
    thank you again
  25. Re: Another complicated query but perhaps possible

    I was able to solve this ussue by a workaroud.
    Instead of creating a new table, I added a column "Paid" in "tbl_student_class" table.
    then I used this code:

    StrSql = "Select sum(Payment) as...
  26. Re: Another complicated query but perhaps possible

    Hello Zvoni
    I have created a new table (Payment_tbl)
    In this table I mark all the transactions that are complete.
    If the sum(payments) in the (transaction_tbl) = the price in (the...
  27. Re: Another complicated query but perhaps possible

    Zvoni
    Thank you very very much
    I'm so grateful to you
    I'll keep the thread open for some days
    If I meet a problem, I'll come back.
  28. Re: Another complicated query but perhaps possible

    The answer is : his ratio ("50%") of the "individual" Student's price
    As explained so far:
    The school is not going to spend any money out of the students'fees.
    It 's very complicated as described...
  29. Re: Another complicated query but perhaps possible

    In this case, Can a student negociate the price of a subject?
  30. Re: Another complicated query but perhaps possible

    I think no escape of a second trasaction table.
  31. Re: Another complicated query but perhaps possible

    you're completely right sir
  32. Re: Another complicated query but perhaps possible

    thank you sir for your crystal explanation.
    I understand quite well your concept.
    However in the case of the school to which I'm trying to help them with this application , the concept is...
  33. Re: Another complicated query but perhaps possible

    Zvoni
    Excuse my weak understanging.
    I think I see another issue .
    I noticed that the teacher's price is retrieved from the tbl_subject (subject_price) however in my situation the teacher's price...
  34. Re: Another complicated query but perhaps possible

    Looking closely to the code, I figured out that students payments and teachers payments are done seperately in the same table.
    Mr Zvoni:
    A question out of curiosity:
    Which method is simpler but...
  35. Re: Another complicated query but perhaps possible

    Zvoni
    Thank you very much the magical work you are doing.

    Frankly I am not up to the task to do that.
    Zvoni
    I see that the teacher is payed synchronously to the Students payments which does not...
  36. Re: Another complicated query but perhaps possible

    I think I start to get my happiness.
    I created a new table "Transaction_teacher_tbl"

    CREATE TABLE "Transaction_teacher_tbl" (
    "ID" INTEGER,
    "Teacher_ID" INTEGER,
    "Payment" ...
  37. Re: Another complicated query but perhaps possible

    I'm sorry I have just seen your last post.

    It is individual.
    one student may study 6 sessions for English but another one may enroll for 10 for the same subject.
  38. Re: Another complicated query but perhaps possible

    Billions thanks sir
    You are really great man.
    I have tested the code as a whole and it worked like a charm.
    I need some time to split the code and apply it to specific situations.

    Now the...
  39. Re: Another complicated query but perhaps possible

    Thank you very much
  40. Re: Another complicated query but perhaps possible

    You are right
    take your time sir
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width