Subject Re: sql problem
Author Adam
--- In firebird-support@yahoogroups.com, Fabio Gomes <fabioxgn@g...>
wrote:
>
> As long as i know firebird 1.5 doesnt support alias in the where
clause..

um, yes it does.

> try removing the alis from the where clause, and i dont think
firebird
> support the "upper" feature too.

it definately supports upper as well.

What Firebird 1.5 does not support that IB 6 did "support" (well it
returned something even if it was not what you wanted) is certain
ambiguous fields, where you say something like "where ID=1" but do
not indicate which of the tables that has an ID field you mean.

Mark, looking at your query, nothing jumps out at me as being a
problem, so I suspect we are not getting the whole story.

Start by trying this query in iSQL.


select
t.TEAMNO,
t.TEAMNAME,
t.activestatus,
t.Leagueno,
l.LeagueName from
TEAMS t
join Leagues l on l.leagueno = t.leagueno
join Sports s on s.sportno = l.sportno
where s.CID = 1
and t.UPPERTEAMNAME starting with upper('B')
order by t.upperteamname

(ie, forget the parameters)

If it works, then start substituting the parameters back in. You will
probably find you have a comma, bracket or quotation symbol where you
shouldn't.

Adam