Subject | Re: [IBO] "order by coalesce" problem |
---|---|
Author | Matej Golob |
Post date | 2004-12-14T08:40:12Z |
--- In IBObjects@yahoogroups.com, "Jason Wharton" <jwharton@i...> wrote:
"select field1 from my_table order by coalesce(field1, field2)",
with SQL monitor I see:
select field1, my_table.RDB$DB_KEY from my_table
ORDER BY coalesce(field1 ASC, field2) ASC
Thanks for help and regards.
Matej
> > If I put SQL sentence likeInto query i put:
> > "select * from table order by coalesce(field1, field2)"
> > into TIBOQuery, I got error:
> > Dynamic SQL Error SQL error code = -104 Token unknown - line 4, char
> > 30 ASC
> >
> > I tryed same sentence in IBExpert, and works fine.
>
> Show us more please, what does the SQL trace monitor show?
"select field1 from my_table order by coalesce(field1, field2)",
with SQL monitor I see:
select field1, my_table.RDB$DB_KEY from my_table
ORDER BY coalesce(field1 ASC, field2) ASC
> My guess is the SQL parsing I do is messing it up.Yes, it looks like that...
Thanks for help and regards.
Matej