Jump to content

irmira_fasyah

Learning
  • Content Count

    10
  • Joined

  • Last visited

Posts posted by irmira_fasyah


  1. Salam & Hi.
    sape forumers kt sini yg expert pasal jsp n netbeans IDE?
    saya nk tnye psal::

    1.mcmne nk import dan apply jfreechart dlm project. *actually dh add jar jfreechart dlm projek but still ade error*
    2.nak mnx tunjuk ajar sape2 yg expert mcm mane nk generate static chart and also dynamic chart

    thanks in advance :)

  2. ok dah solve dah....

    mcm ni>>


    [font=courier new,courier,monospace]update table2 a [/font]
    [font=courier new,courier,monospace]join table1 b [/font]
    [font=courier new,courier,monospace]on a.idnilai=b.idnilai set a.totalmark =(select ((sum(mark)/500)*100) from table1 [/font]
    [font=courier new,courier,monospace]where idnilai='"+idnilai+"')[/font]
    [font=courier new,courier,monospace]where b.idnilai='"+idnilai+"' and year(a.tahun)=year(b.tarikh)[/font]


    so far jadi la..he

    any comment ?? persoalan kat cni, knape subquery tu xpyh declare 'dot' tu? cthnye::


    [font='courier new', courier, monospace]"a.totalmark =(select ((sum(b.mark)/500)*100)[/font][font='courier new', courier, monospace]where b.idnilai='"+idnilai+"')[/font]

  3. Salam & hai.
    saya tengah develop system penilaian utk projek tahun akhir saya.
    nak tnye utk query update join table

    database ade 2 table. table1 and table2. table1 utk mark. table2 utk totalmark yg diberi oleh penilai kepada yg dinilai.

    table1

    [b]idpenilai idnilai tarikh mark [/b]
    Kan0001 Pen0001 2012-10-24 45
    Kan0002 Pen0002 2012-10-24 54
    Kan0003 Pen0001 2012-10-24 23
    Kan0004 Pen0002 2012-10-24 53
    Kan0005 Pen0001 2012-10-24 67
    Kan0006 Pen0002 2012-10-24 45
    Kan0007 Pen0001 2012-10-24 98



    table2

    [b]idnilai tarikh Totalmark [/b]
    Pen0001 2012-10-24 45
    Pen0002 2012-10-24 54



    everytime idpenilai evaluate idnilai, markah akan sentiasa update dlm table2 referred to idnilai.

    then part of update query yg sye buat ::

    [font=courier new,courier,monospace]update table2 a
    join table1 b
    on a.idnilai=b.idnilai
    set a.totalmark=sum(b.mark)/500*100
    where year(a.tarikh)=year(b.tarikh)[/font]

    tapi bila run, keluar error 'invalid use of group function'.

    dh cari solution dari web2 lain, kena guna subquery tp makin confuse.

    hope ade yang dapat bantu..

    thanks in advance :)
×
×
  • Create New...