hi,
I'm really new in firebird.
its have different between mysql and firebird. Could you guide me where/what the sources if I want to refer the problem in sql statement in firebird.
thanks
SQL in firebird
select SUM(MARKAH.GRED='''TH''') as TH,
SUM(MARKAH.GRED='''X''') as X,
SUM (MARKAH.GRED '''') as JUM from markah inner join
maklumat_pelajar on maklumat_pelajar.id_pelajar=markah.id_pelajar where markah.id_matapelajaran =1
and
maklumat_pelajar.id_kelas=1
and markah.id_peperiksaan=1
An error occur...Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Token unknown - line 1, char 23.
=.
Could u please help me
SUM(MARKAH.GRED='''X''') as X,
SUM (MARKAH.GRED '''') as JUM from markah inner join
maklumat_pelajar on maklumat_pelajar.id_pelajar=markah.id_pelajar where markah.id_matapelajaran =1
and
maklumat_pelajar.id_kelas=1
and markah.id_peperiksaan=1
An error occur...Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Token unknown - line 1, char 23.
=.
Could u please help me
InterBase or Firebird SQL doesn't support such constructions in SELECT clause, you should use join with SELECT COUNT (*) FROM ... WHERE ... or declare stored procedure that returns desired values.
Please note that we do not provide support for Firebird or InterBase database or other database servers (if you need information about them please contact their vendors), we support our products only. This forum is dedicated on IBDAC, so here you can post questions if you experience any problem with IBDAC.
Please note that we do not provide support for Firebird or InterBase database or other database servers (if you need information about them please contact their vendors), we support our products only. This forum is dedicated on IBDAC, so here you can post questions if you experience any problem with IBDAC.