Subject | Re: odd select case problem |
---|---|
Author | Adam |
Post date | 2006-08-15T23:37:37Z |
--- In firebird-support@yahoogroups.com, Jose Antunes <ntnsjs@...>
wrote:
to run normal but recently its simply started not to work anymore
here in my computer. strangely, it still runs normal at the company
and i haven't changed the code or the tables. i used the following
select:
You are referencing many fields from a table or alias called T2, yet
this table or alias is never referenced in your from clause and there
are no joins etc. Basically you are asking Firebird to make up some
values.
Of course you may have simply not posted your entire query??
If you say that it is working on one server but not another, you need
to check the version installed. I believe CASE was only introduced in
Firebird 1.5, so if your other server is an earlier version it will
not understand the error.
Adam
wrote:
>and at my company. i use a select in my delphi application that used
> hello all.. i dont know what to do anymore. i run firebird 1.5 here
to run normal but recently its simply started not to work anymore
here in my computer. strangely, it still runs normal at the company
and i haven't changed the code or the tables. i used the following
select:
>T1.id_sistema,
> SELECT T1.num_cupom, T1.id_tipo_transacao, T1.data, T1.hora,
> T1.id_usuario, T1.id_cliente, T1.opcao, T1.desc_especial,T2.cnpj,
> T1.tt_unidades, T1.total, T1.observacao, t1.confirmada,
> T2.codigo_vip, T2.nome AS cliente, T2.email, T2.rg, T2.cpf,
> T2.razaosoc, T2.fone_res, T2.fone_cel, T2.fone_com, T2.cidade,Of course it will not work.
> CASE t1.confirmada WHEN 0 then 'open'
> ELSE 'close' END as status
> FROM tab_propostas T1
You are referencing many fields from a table or alias called T2, yet
this table or alias is never referenced in your from clause and there
are no joins etc. Basically you are asking Firebird to make up some
values.
Of course you may have simply not posted your entire query??
If you say that it is working on one server but not another, you need
to check the version installed. I believe CASE was only introduced in
Firebird 1.5, so if your other server is an earlier version it will
not understand the error.
Adam