[firebird-support] Re: update statement Excel Sheet

2012-07-02 Thread mahdoom_a

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 
when is invalid.

my firebird server is V1.0.3.973 maybe its old thats why ?


Regards.

Ahmad sarhan


--- In firebird-support@yahoogroups.com, Alan J Davies  wrote:
>
> 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 - successful update
> Plan
> PLAN (MNGRNT NATURAL)
> 
> 3 record(s) was(were) updated in MNGRNT
> 
> This is the table after update
> RFRNC AQNO
> 155   50001
> 166   50002
> 1331  50003
> 
> You must be doing something that you're not telling us because this 
> "just works" and is as simple as it gets really.
> 
> What else are you trying to do?
> Regards
> Alan
> 
> Alan J Davies
> Aldis
> 
> On 02/07/2012 16:23, mahdoom_a wrote:
> > 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:
> >  >
> >  > 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
> >  > > 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
> >  > >  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"  >  > > > > > 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
> >  > > > >
> >  > > > >
> >  > > >
> >  > >
> >  > >
> >  >
> >
> >
>




[firebird-support] Re: database in external USB HDD

2012-07-02 Thread trskopo
I use FB 2.01 in external USB drive connected to the server for about 3-4 
years. No problem at all, I think FB 2.5 won't be a problem too.

Currently, using FB 2.5 on a RAM Disk (in server) for a better speed.

incendio.
--- In firebird-support@yahoogroups.com, "Sergio H. Gonzalez" 
 wrote:
>
> Hello there!
> 
> I use FB 2.5. Is there any known problem with having the database file 
> in an external USB drive conected to the server?
> Just in case (don't know if it matters!) I always use superserver mode.
> 
> thanks!!
> 
> -sergio
> 
> 
> [Non-text portions of this message have been removed]
>




Re: [firebird-support] How do you get a summary SUM() from a union of tables

2012-07-02 Thread Mark Rotteveel
On 2-7-2012 20:07, Cornie van Schoor wrote:

> Set thanks for the reply, I just have one problem, the union removes
> duplicates.  So if both tables have
> Item1, 50
> the result is
> Item1, 50 and not
> Item1, 100 as I require.

Use UNION ALL instead of UNION.

Mark
-- 
Mark Rotteveel




RE: [firebird-support] How do you get a summary SUM() from a union of tables

2012-07-02 Thread Cornie van Schoor
 >I have 2 (and more) tables with identical structure:
 >
 >Simplified structure and data:
 >CODE VARCHAR(15)
 >QUAN INTEGER
 >
 >Table A
 >Item1, 50
 >Item1, 40
 >Item2, 70
 >
 >Table B
 >Item1, 50
 >Item2, 100
 >Item2, 30
 >
 >I need to get the sum(QUAN) for all the rows in all the tables group 
by CODE
 >
 >Item1, 140
 >Item2, 200
 >
 >Is there a way I can do it with a UNION? Or is there a better way?
 >

Hi Cornie!

This can be solved several ways, one simple solution would be:

WITH TMP AS
(SELECT CODE, QUAN
FROM TableA
UNION
SELECT CODE, QUAN
FROM TableB)

SELECT CODE, SUM(QUAN)
FROM TMP
GROUP BY CODE

HTH,
Set

Set thanks for the reply, I just have one problem, the union removes 
duplicates.  So if both tables have
Item1, 50
the result is
Item1, 50 and not
Item1, 100 as I require.

Regards

Cornie


[firebird-support] Database Corruption

2012-07-02 Thread jakefeed
I have a customer database that is returning "internal gds software consistency 
check (applied differences will not fit in record (177))" whenever I access a 
particular table. 
I've run gbak with -g switch and it fails on the one particular table
I've run it with and without running gfix -v -full before the gbak.

It still fails.
One thread I found suggested changing the database to read_only before running 
the gbak command.  It still errors with the same message referred to at the top 
of the post on the same table.

In the firebird.log, there is a deadlock error which occurred 90 minutes before 
the "...applied differences..." error.
This is a Firebird 1.5 database.
Any help is appreciated. 



Re: [firebird-support] Re: Data Import from CSV

2012-07-02 Thread Ann Harrison
>
> "jwcane2003"  wrote:
>
> > Looking for a safe and reliable import process
> > from csv data to firebird db. Any pointers or
> > other info appreciated.
>
> On Sat, Jun 30, 2012 at 4:48 PM, plinehan  wrote:
>
> Have you tried External Tables?
>

External tables require fixed length fields (DEC heritage) and do not work
with
comma separated value files.

Good luck,

Ann


[Non-text portions of this message have been removed]



Re: [firebird-support] Re: update statement Excel Sheet

2012-07-02 Thread Alan J Davies
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 - successful update
Plan
PLAN (MNGRNT NATURAL)

3 record(s) was(were) updated in MNGRNT

This is the table after update
RFRNC   AQNO
155 50001
166 50002
133150003

You must be doing something that you're not telling us because this 
"just works" and is as simple as it gets really.

What else are you trying to do?
Regards
Alan

Alan J Davies
Aldis

On 02/07/2012 16:23, mahdoom_a wrote:
> 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:
>  >
>  > 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
>  > > 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
>  > >  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"   > > > > > 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
>  > > > >
>  > > > >
>  > > >
>  > >
>  > >
>  >
>
> 





++

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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yaho

RE: [firebird-support] How do you get a summary SUM() from a union of tables

2012-07-02 Thread Svein Erling Tysvær
>I have 2 (and more) tables with identical structure:
>
>Simplified structure and data:
>CODE VARCHAR(15)
>QUAN INTEGER
>
>Table A
>Item1, 50
>Item1, 40
>Item2, 70
>
>Table B
>Item1, 50
>Item2, 100
>Item2, 30
>
>I need to get the sum(QUAN) for all the rows in all the tables group by CODE
>
>Item1, 140
>Item2, 200
>
>Is there a way I can do it with a UNION?  Or is there a better way?
>

Hi Cornie!

This can be solved several ways, one simple solution would be:

WITH TMP AS
(SELECT CODE, QUAN
 FROM TableA
 UNION
 SELECT CODE, QUAN
 FROM TableB)

SELECT CODE, SUM(QUAN)
FROM TMP
GROUP BY CODE

HTH,
Set


[firebird-support] How do you get a summary SUM() from a union of tables

2012-07-02 Thread cornievs
Hi

I have 2 (and more) tables with identical structure:

Simplified structure and data:
CODE VARCHAR(15)
QUAN INTEGER

Table A
Item1, 50
Item1, 40
Item2, 70

Table B
Item1, 50
Item2, 100
Item2, 30

I need to get the sum(QUAN) for all the rows in all the tables group by CODE

Item1, 140
Item2, 200

Is there a way I can do it with a UNION?  Or is there a better way?

Regards

Cornie van Schoor
InfoStar Software





[firebird-support] Re: update statement Excel Sheet

2012-07-02 Thread mahdoom_a
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:
>
> 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
> > 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
> >  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"  >  > > > 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
> >  > >
> >  > >
> >  >
> >
> >
>




[firebird-support] Re: update statement Excel Sheet

2012-07-02 Thread cantak3
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
> > 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.




[firebird-support] COLLATE usage for blob and varchar fields on an UTF8 database

2012-07-02 Thread patrick_marten
Hello,

currently I have a database with ISO8859_1 as character set. This character set 
applies to most fields, but some have a different one, so that a table looks 
like this:


CREATE TABLE MY_TABLE
(
  ...,
  DESCRIPTION1  BLOB SUB_TYPE 1 
SEGMENT SIZE 80,
  DESCRIPTION2  BLOB SUB_TYPE 1 
SEGMENT SIZE 80 CHARACTER SET ISO8859_5,
  SHORT_DESCRIPTION1VARCHAR(   100),
  SHORT_DESCRIPTION2VARCHAR(   100) 
CHARACTER SET ISO8859_5,
  SOME_TEXTFIELDVARCHAR(50) 
COLLATE ISO8859_1,
  ...;
);

We are planning to convert everything to unicode and have created a database 
script + a database with UTF8 as character set, so that we can continue with 
development and then see, how to convert existing customer databases etc. (this 
will probably lead to a separate topic here with a lot of questions ;) )

Unfortunately I don't remember how we had created our current testing-database, 
so that a few things need to be clarified.

Another step will be, to change some blob fields from SUB_TYPE 1 to SUB_TYPE 0, 
because the component we will be using on the UTF8 version is working with a 
binary format for descriptions etc., so that the similar part of the new script 
(UTF8 database) looks like this:

CREATE TABLE MY_TABLE
(
  ...,
  DESCRIPTION1  BLOB SUB_TYPE 0 
SEGMENT SIZE 80 COLLATE UNICODE,
  DESCRIPTION2  BLOB SUB_TYPE 0 
SEGMENT SIZE 80 COLLATE UNICODE,
  SHORT_DESCRIPTION1VARCHAR(   100) COLLATE 
UNICODE,
  SHORT_DESCRIPTION2VARCHAR(   100) COLLATE 
UNICODE,
  SOME_TEXTFIELDVARCHAR(50) 
COLLATE UNICODE,
  ...;
);

IBExpert shows me current UTF8 table as follows:

Field Name | Field Type | Size | Subtype | Charset | Collate |
-
DESCRIPTION1 | BLOB | 80 | Binary | UTF8 | UTF8 (*) |
DESCRIPTION2 | BLOB | 80 | Binary | UTF8 | UTF8 (*) |
SHORT_DESCRIPTION1 | VARCHAR | 100 |  | UTF8 | UNICODE |
SHORT_DESCRIPTION1 | VARCHAR | 100 |  | UTF8 | UNICODE |
SOME_TEXTFIELD | VARCHAR | 50 |  | UTF8 | UNICODE |

Collate for the first two fields is different in IBExpert than in the script.

I've needed to add some fields to the table and tried this, based on the UTF8 
script:

alter table MY_TABLE add  ANOTHER_DESCRIPTION BLOB SUB_TYPE 0  SEGMENT SIZE 80  
COLLATE UNICODE;

but this fails with an error like "Invalid datatype. Incorrect usage of 
Character set or Collate".

In order to work it had to be:

alter table MY_TABLE add  ANOTHER_DESCRIPTION BLOB SUB_TYPE 0  SEGMENT SIZE 80;

So the first question is, how is it possible, that IBExpert shows me UTF8 for 
the "Collate" column (see above at the (*) symbol).

Because of the error with alter table, I thought that I must have created the 
table without collate and just forgott to edit the script.
I thought, that IBXpert automatically shows UTF8 as character set and collate 
in such a case, i.e. if nothing was specified for those fields.

But for the newely added field "ANOTHER_DESCRIPTION" IBExpert shows this:
Field Name | Field Type | Size | Subtype | Charset | Collate |
-
DESCRIPTION1 | BLOB | 80 | Binary |  |  |

So now I'm somehwat confused and am not sure, what is correct and why there are 
such differences and how to use collate properly in that case.

Please put some light into the dark...

Kind regards,
Patrick



[firebird-support] database in external USB HDD

2012-07-02 Thread Sergio H. Gonzalez
Hello there!

I use FB 2.5. Is there any known problem with having the database file 
in an external USB drive conected to the server?
Just in case (don't know if it matters!) I always use superserver mode.

thanks!!

-sergio


[Non-text portions of this message have been removed]



Re: [firebird-support] Re: update statement Excel Sheet

2012-07-02 Thread Alan J Davies
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
> 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
>  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"   > > > 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
>  > >
>  > >
>  >
>
> 





++

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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



[firebird-support] Database Info Server Properties/Log IBExpert

2012-07-02 Thread albertdasi
Hello,

With IBExpert "Server Properties/Log" option is possible to see the number of 
connections and the number and name of the database currently open. I installed 
a new Linux virtualized server and in the section "Database Info" of "Server 
properties/Log" don't show this information (I attach the all text that Server 
Properties/Log of IBExpert shows it). 

The same IBExpert showing correctly this information of another Firebird server 
with the same Firebird version (2.1.4.18393 Classic Server) and with same Linux 
distribution (CentOS).  Who know what the server connections information 
doesn't show? Have any special configuration in Firebird to get these 
information?

Thank you in advance. 

Albert.
  
Server Version Info
---
Server Version: LI-V2.1.4.18393 Firebird 2.1
Server Implementation: Firebird/linux AMD64
Service Version: 2
 
 
Configuration Info
---
Base File: /opt/firebird/
Lock File: /opt/firebird/
Message File: /opt/firebird/
Security Database: /opt/firebird/security2.fdb
 
 
 
Database Info
---
Cannot get database info:
---
Unsuccessful execution caused by system error that does not preclude successful 
execution of subsequent statements.
feature is not supported.