Subject | Re: update statement Excel Sheet |
---|---|
Author | mahdoom_a |
Post date | 2012-07-02T06:40:02Z |
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)but I don't know why its invalid.
Best Regards
Ahmad Sarhan
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)but I don't know why its invalid.
Best Regards
Ahmad Sarhan
--- In firebird-support@yahoogroups.com, Alan J Davies <Alan.Davies@...> wrote:
>
> update T1
> set Col1 =
> case
> when Col2 = No1
> then Val1
> when Col2 = No2
> then Val2
> when Col2 = No3
> then Val3
> end
>
>
> Alan J Davies
> Aldis
>
>
>
> On 01/07/2012 17:53, Hans wrote:
> > Using the SQL CASE in your update statement may work.
> >
> > Best Regards
> > Hans
> >
> > Sent from my iWatuski
> >
> > On 2012-07-01, at 9:17 AM, "Ahmad F. Sarhan" <mahdoom_a@...
> > <mailto:mahdoom_a%40yahoo.com>> wrote:
> >
> > Hey everyone,
> > I need your help in one of 2 questions please,
> >
> > 1st.
> >
> > i need to update my table with multi values , each value has its own
> > condition
> > I mean
> > update T1
> > set Col1 = Val1 where Col2 = No1
> > set Col1 = Val2 where Col2 = No2
> > set Col1 = Val3 where Col2 = No3
> > .
> > .
> > .
> > Set Col1 = Val 600 where Col2 = No600
> >
> > and so on. I tried the simple lines as I wrote above but its not working.
> >
> > 2nd.
> >
> > I want to update my Table from excel sheet how can firebird read from
> > excel sheet.
> >
> > Thanks
> >
> > ~{ Ahmad F. Sarhan }~
> >
> > [Non-text portions of this message have been removed]
> >
> > ------------------------------------
> >
> > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >
> > Visit http://www.firebirdsql.org and click the Resources item
> > on the main (top) menu. Try Knowledgebase and FAQ links !
> >
> > Also search the knowledgebases at http://www.ibphoenix.com
> >
> > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> > Yahoo! Groups Links
> >
> >
>