Page 1 of 1

SQL in firebird

Posted: Mon 05 Jun 2006 07:49
by suarahati
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

Posted: Mon 05 Jun 2006 08:04
by suarahati
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

Posted: Tue 06 Jun 2006 03:43
by suarahati
could anybody help me.?

Posted: Tue 06 Jun 2006 08:19
by Alex
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.