Great Alan,
I tried this
update mngrnt
set rfrnc=
case
when aqno = '50001' then 155
when aqno = '50002' then 166
when aqno = '50003' then 1331
end
I got SQL error
Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Token unknown - line 4, char 1.
when.
'when' is identified(in bold black)
If there's a typo you are just not setting, then you could also try the other
case format:
update mngrnt set rfrnc = case aqno
when '50001' then '155'
when '50002' then '166'
etc
end
> > I tried this
> >
> > update mngrnt
> > set rfrnc=
> > case
> > when aqno = '50001' then 155
> >
aqno is intger
rfrnc is varchar
I tried another format of case statement
like:
update mngrnt set rfrnc = case aqno
when 50001 then '155'
when 50002 then '166'
end
I got same SQL error but unknown token is aqno
Regards.
--- In firebird-support@yahoogroups.com, Alan J Davies wrote:
>
> Wha
Alan Dear,
I dont know whats wrong, Thats why I asking, its simple and should work easly.
I tried to use IBexpert V2.5.0.49 and RazorSQL V5.6.3 to excute the command and
still getting the same error msg. also I copied the sql you just sent to me as
it is and still giving the same error msg
w
Dear Thomas,
I have update the FB server to 2.5 Same problem :(
Regards,
ahmad sarhan
--- In firebird-support@yahoogroups.com, Thomas Steinmaurer wrote:
>
> Hello,
>
> > I dont know whats wrong, Thats why I asking, its simple and should work
> > easly.
> >
> > I tried to use IBexpert
>> > my firebird server is V1.0.3.973 maybe its old thats why ?
>>
>> Yes. The CASE construct has been added in V1.5.
>
>I have update the FB server to 2.5 Same problem :(
Because your database still has an old ODS? Fb 2.5 can still open old Fb
versions, but you don't get access to new thin
YES
after the update to FB 2.5 and then backup & restore its wonderful,, appreciate
it everyone
svein_erling, iblogmanager, Alan.Davies, Hans
Thanks all.
--- In firebird-support@yahoogroups.com, Svein Erling Tysvær
wrote:
>
> >> > my firebird server is V1.0.3.973 may
Guys,,
after the update i got a problem with the application the error msg is
General SQL erroe.
Invalid expression in the HAVING clause (nither an aggregate function nor a
part of the GROUP BY clause).
I think I need to update the the UDF or LIB maybe
the application was working great
>after the update i got a problem with the application the error msg is
>
>General SQL erroe.
>Invalid expression in the HAVING clause (nither an aggregate function nor a
>part of the GROUP BY clause).
>I think I need to update the the UDF or LIB maybe
>
>the application was working great wi
the SQL statement that containing the error is
-
select L_ID, AC_ID, AC_ENAME
,AC_ANAME , DOCNO, REF,
ENTRY_ID,
What is aqno? An integer or character field?
If its an integer try without ' '
Is it in the same table as rfrnc?
Otherwise there is nothing wrong with the code.
Alan
Alan J Davies
Aldis
On 02/07/2012 07:40, mahdoom_a wrote:
> Great Alan,
>
> I tried this
>
> update mngrnt
> set rfrnc=
> case
>
Hi mahdoom_a, I've just created this table MNGRNT (like yours)
RFRNC AQNO
50001
50002
50003
I then ran this code:
update mngrnt
set rfrnc=
case
when aqno = 50001 then '155'
when aqno = 50002 then '166'
when aqno = 50003 then '1331'
end
This is the message -
Hello,
> I dont know whats wrong, Thats why I asking, its simple and should work easly.
>
> I tried to use IBexpert V2.5.0.49 and RazorSQL V5.6.3 to excute the command
> and still getting the same error msg. also I copied the sql you just sent to
> me as it is and still giving the same error msg
> the SQL statement that containing the error is
Reformatted by me (it was almost unreadable) and slightly modified (no need to
cast nulls)
> -
> select L_ID, AC_ID, AC_ENAME, AC_ANAME, DOCNO, REF, ENTRY_ID, JV, A_DESC,
> E_DESC,
14 matches
Mail list logo