RE: [firebird-support] Proper Case Function for Firebird 2.5.4 and above

2019-07-15 Thread 'stwizard' stwiz...@att.net [firebird-support]
I use Database Workbench for all my Firebird Development and testing.

 

From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] 
Sent: Monday, July 15, 2019 7:49 AM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] Proper Case Function for Firebird 2.5.4 and
above

 

  

This is strange. When I run it in Firebird Maestro 17.1 it returns empty
string. When I run it is Database Workbench 5.5 it works as expected.

From: firebird-support@yahoogroups.com  
Sent: Monday, July 15, 2019 7:50 AM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Proper Case Function for Firebird 2.5.4 and
above

Greetings All,

We are currently on Firebird 2.5.4 and hope to move to Firebird 3.0 by the
end of this year once I determine what all needs to take place in
preparation to do so.

One of the things we did when moving from Firebird 1.5 to 2.5 was to remove
the dependencies on external UDF's from FreeAdhocUDF since Firebird at that
point contained an internal replacement for most of those that we used.

I have one UDF left to replace F_PROPERCASE(). It appears Firebird 2.5 nor
Firebird 3.0 have a replacement internal UDF for this one unless I missed
it.

So we tried to come up with a way of doing this with a few stored procedures
that my associate wrote. They are included below.

They compiled and worked great. The next day when I tried to extract the
metadata on my development database and the database on the office server to
compare them to do an update script I received an error that I need guidance
with.

First off here is how to use the stored procedures:

PROPER_CASE('firebird support group') which would return 1 value containing:
Firebird Support Group

PROPER_CASE calls SPLITTER:
SPLITTER('firebird support group', ' ') which would return 3 values in the
cursor containing:
firebird
support
group

Here are the two stored procedures:

set term ^ ;
create or alter procedure SPLITTER (
in_str varchar(8190), 
in_splitter char(1))
returns (
out_str varchar(8190) )
as
declare variable iLast integer;
declare variable iNext integer;
declare variable iLen integer;
begin
iLast = 1;
iNext = position(:in_splitter, in_str, iLast); 
iLen = char_length(in_str) + 1;
if (:iNext = 0) then
begin
out_str = in_str;
suspend;
end
else
begin
while (:iNext > 1) do
begin
out_str = substring(:in_str from :iLast for :iNext - :iLast);
iLast = iNext + 1;
iNext = position(:in_splitter, in_str, iLast);
suspend;
end
if (iNext = 0 and iLast > 1) then
begin
out_str = substring(:in_str from :iLast for :iLen - :iLast);
suspend;
end
end
end^
set term ; ^

GRANT EXECUTE
ON PROCEDURE SPLITTER TO SYSDBA;

set term ^ ;
create or alter procedure PROPER_CASE (
in_str varchar(8190) )
returns (
out_str varchar(8190) )
as
declare variable tmp varchar(8190);
declare variable tcase varchar(8190);
begin
out_str = '';
for select out_str from SPLITTER(:in_str, ' ') into :tmp
do begin
if (char_length(tmp) > 0) then
tcase = upper(left(tmp, 1)) || lower(right(tmp, char_length(tmp)
-1));
if (char_length(tcase) > 0 and char_length(out_str) > 0) then
out_str = out_str || ' ' || tcase;
else
out_str = tcase;
end
suspend;
end^
set term ; ^

GRANT EXECUTE
ON PROCEDURE PROPER_CASE TO SYSDBA;



So what was the error?

When extracting the metadata on the production database:
Procedure SPLITTER: Invalid factor in expression (POSITION)
Script: Line:11 Pos:20

Anyone have any idea what needs to be done to correct this problem? Or does
anyone have another way to proper case a string without using F_PROPERCASE
external function?

Thanks for all who reply with advice on how to proceed.

Mike

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





[firebird-support] Proper Case Function for Firebird 2.5.4 and above

2019-07-15 Thread 'stwizard' stwiz...@att.net [firebird-support]
Greetings All,

We are currently on Firebird 2.5.4 and hope to move to Firebird 3.0 by the
end of this year once I determine what all needs to take place in
preparation to do so.

One of the things we did when moving from Firebird 1.5 to 2.5 was to remove
the dependencies on external UDF's from FreeAdhocUDF since Firebird at that
point contained an internal replacement for most of those that we used.

I have one UDF left to replace F_PROPERCASE().  It appears Firebird 2.5 nor
Firebird 3.0 have a replacement internal UDF for this one unless I missed
it.

So we tried to come up with a way of doing this with a few stored procedures
that my associate wrote.  They are included below.

They compiled and worked great.  The next day when I tried to extract the
metadata on my development database and the database on the office server to
compare them to do an update script I received an error that I need guidance
with.

First off here is how to use the stored procedures:

PROPER_CASE('firebird support group') which would return 1 value containing:
Firebird Support Group

PROPER_CASE calls SPLITTER:
SPLITTER('firebird support group', ' ') which would return 3 values in the
cursor containing:
firebird
support
group

Here are the two stored procedures:

set term ^ ;
create or alter procedure SPLITTER (
in_str varchar(8190), 
in_splitter char(1))
returns (
out_str varchar(8190) )
as
declare variable iLast integer;
declare variable iNext integer;
declare variable iLen integer;
begin
iLast = 1;
iNext = position(:in_splitter, in_str, iLast); 
iLen = char_length(in_str) + 1;
if (:iNext = 0) then
begin
out_str = in_str;
suspend;
end
else
begin
while (:iNext > 1) do
begin
out_str = substring(:in_str from :iLast for :iNext - :iLast);
iLast = iNext + 1;
iNext = position(:in_splitter, in_str, iLast);
suspend;
end
if (iNext = 0 and iLast > 1) then
begin
out_str = substring(:in_str from :iLast for :iLen - :iLast);
suspend;
end
end
end^
set term ; ^


GRANT EXECUTE
 ON PROCEDURE SPLITTER TO  SYSDBA;


set term ^ ;
create or alter procedure PROPER_CASE (
in_str varchar(8190) )
returns (
out_str varchar(8190) )
as
declare variable tmp varchar(8190);
declare variable tcase varchar(8190);
begin
out_str = '';
for select out_str from SPLITTER(:in_str, ' ') into :tmp
do begin
if (char_length(tmp) > 0) then
tcase = upper(left(tmp, 1)) || lower(right(tmp, char_length(tmp)
-1));
if (char_length(tcase) > 0 and char_length(out_str) > 0) then
out_str = out_str || ' ' || tcase;
else
out_str = tcase;
end
suspend;
end^
set term ; ^


GRANT EXECUTE
 ON PROCEDURE PROPER_CASE TO  SYSDBA;



So what was the error?

When extracting the metadata on the production database:
Procedure SPLITTER: Invalid factor in expression (POSITION)
Script: Line:11 Pos:20

Anyone have any idea what needs to be done to correct this problem?  Or does
anyone have another way to proper case a string without using F_PROPERCASE
external function?

Thanks for all who reply with advice on how to proceed.

Mike







[firebird-support] Installing Firebird during the installation of my product

2017-05-19 Thread 'stwizard' stwiz...@att.net [firebird-support]
Greeting All,

 

I have a small application written in Delphi that uses Firebird,  It is 
intended to be used on a single computer currently.  Possibly moving the 
database to a server later which would mean installing firebird on the server 
and then a separate install of Firebird on the client.

 

But for now I just need to setup Firebird on a single computer and would like 
to do so silently if possible so my app is painless as possible to install.

 

Is there any way to install firebird silently as part of my installation app?

 

Any documentation on how to do this for a single computer?  And possibly later 
how to do it for a server and client install?

 

Comments and suggestions welcomed.

 

Thanks,

Mike



[firebird-support] Cannot create simple table

2016-07-21 Thread 'stwizard' stwiz...@att.net [firebird-support]
Greetings All,

 

Firebird v2.5.4

 

Trying to create a simple table and receive this error:

 

unsuccessful metadata update

cannot create index PK_CUR_CASE_INV_NON_JUD_CNT

while executing:

ALTER TABLE CUR_CASE_INV_NON_JUD_CNTY ADD CONSTRAINT FK_CUR_CASE_INV_RPT3 

  FOREIGN KEY (REPORT_ID) REFERENCES CUR_CASE_INV_RPT

  (REPORT_ID) 

  ON DELETE CASCADE

  ON UPDATE NO ACTION

 

 

Here is the DDL:

 

CREATE TABLE CUR_CASE_INV_NON_JUD_CNTY 

(

  REPORT_ID  INTEGER NOT NULL,

  FILING_COUNTY  VARCHAR(54) NOT NULL COLLATE NONE,

  NON_JUD_COUNT  INTEGER NOT NULL,

  NON_JUD_AMTNUMERIC( 15, 2) NOT NULL,

CONSTRAINT PK_CUR_CASE_INV_NON_JUD_CNT PRIMARY KEY (REPORT_ID,
FILING_COUNTY)

);

COMMENT ON TABLE CUR_CASE_INV_NON_JUD_CNTY IS '07.19.16 Stores the filing
counties and non judgment data for use with the current case inventory stats
report.';

ALTER TABLE CUR_CASE_INV_NON_JUD_CNTY ADD CONSTRAINT FK_CUR_CASE_INV_RPT3 

  FOREIGN KEY (REPORT_ID) REFERENCES CUR_CASE_INV_RPT

  (REPORT_ID) 

  ON DELETE CASCADE

  ON UPDATE NO ACTION

;

 

 

Any ideas?

 

Mike



RE: [firebird-support] How does one connect to Firebird 2.5.4 that is on a windows server from a linux client?

2016-06-13 Thread 'stwizard' stwiz...@att.net [firebird-support]
Yes I have, about 6 months ago I went through the entire guide.   I went
back and looked just now and directed the user to look at the Working with
Databases section of the quick start guide.  I hope it is what he is
needing.  I know nothing about Linux.

Thanks,
Mike

 Have you read Fireburd Quick Start Guide?
-- 
   WBR, SD.




[firebird-support] How does one connect to Firebird 2.5.4 that is on a windows server from a linux client?

2016-06-13 Thread 'stwizard' stwiz...@att.net [firebird-support]
I have one person in our office that uses a Linux work station that wants to
connect to our Firebird database v 2.5.4 that is on a Windows 2012 Server.
Can anyone share information or a link on how that can be done?

 

I would really appreciate any help.

 

Thanks,

Mike



RE: [firebird-support] Why does "IF (NOT(EXISTS(SELECT 1..." not work as expected?

2016-05-12 Thread 'stwizard' stwiz...@att.net [firebird-support]
Greetings Thomas,

 

Yes, I first have to get my tables cleaned up and then add cascading delete 
foreign key constraint on PER_ADDRESS referencing ADDRESS

 

Thanks,

Mike

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Thursday, May 12, 2016 12:29 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Why does "IF (NOT(EXISTS(SELECT 1..." not work 
as expected?

 

  

> Hello 'stwizard',
> 
> Thursday, May 12, 2016, 12:46:25 AM, you wrote:
> 
>> Here is my simple Stored Procedure. It simply looks for any
>> address in the ADDRESS table that starts with ‘0 ‘ as in “0 SE
>> ADAMS ST” and COUNT(*) how many time it might have been used in
>> PER_ADDRESS and if COUNT() > 0 delete the links from the PER_ADDRESS table.
> 
>> 
> 
>> The next line verifies that there is no remaining links in the
>> PER_ADDRESS table and then deletes the record from the ADDRESS table.
> 
>> 
> 
>> My problem is that even though ADDR_ID 347006 does not exist in the
>> PER_ADDRESS table, the “IF (NOT(EXISTS(SELECT 1..” line thinks there
>> is and skips the deletion of the record f orm the ADDRESS table. 
> 
> 
>> What might I be doing wrong?
> 
> First of all, this is an executable SP, not intended to return a
> result set, so get rid of the RETURNS parameters and declare variables
> instead. While executable SPs *can* return a single-row result set,
> with your for-loop, the only result you would get back would be the
> values from the final iteration of the loop. But that's not the
> reason for your unexpected results.
> 
> In your INTO clause, you are missing the colon (:) markers
> that are needed when variables or parameters are referred to in a DSQL
> statement. I seem to recall that they are optional in v.2.5 (not
> sure) but that would not be a reason for me to omit them.
> 
> Your problem is your variables. With both local variables and
> parameters that you are using like variables, you need to
> 
> (1) Initialise your variables before starting the loop (they start out
> as NULL)
> and
> (2) Re-initialise them at the end of the loop (otherwise, until the
> next time the loop gets a "hit", the variables retain the values that
> existed after the last "hit").
> 
> Also, once you fix those problems, I see no point in adding extra cost
> by revisiting the PER_ADDRESS table to verify the non-existence of
> the records you just deleted. If the delete had failed, you would
> already be in an exception condition and would have jumped past that
> block to the last END statement.
> 
> You don't actually need ADDRESS1 in your working set, either, since
> you don't do anything with it.
> 
> With the correct initialisation/re-initialisation, you already have
> the value of ADDR_ID at that point: either a genuine ID (if the
> current ADDRESS format matches the condition) or the dummy value from the
> initialisation (if no invalid addresses were found for that ADDR_ID in
> PER_ADDRESS).
> 
> CREATE PROCEDURE P_CLEAN_ADDR
> AS
> DECLARE ADDR_ID Integer = -1;
> /* DECLARE ADDRESS VarChar(50) = ''; not needed */
> DECLARE PER_ADDR_CNT SmallInt = -1;
> 
> begin
> FOR SELECT A.ADDR_ID,
> /* A.ADDRESS1, not needed */
> (SELECT COUNT(*) FROM PER_ADDRESS PA
> WHERE PA.ADDR_ID = A.ADDR_ID) AS PER_ADDR_CNT
> 
> FROM ADDRESS A
> WHERE ADDRESS1 STARTING WITH '0 '
> INTO :ADDR_ID, /* :ADDRESS, */ :PER_ADDR_CNT
> DO
> BEGIN
> IF (PER_ADDR_CNT > 0) THEN
> begin
> DELETE FROM PER_ADDRESS WHERE ADDR_ID = :ADDR_ID;
> DELETE FROM ADDRESS WHERE ADDR_ID = :ADDR_ID;
> end
> -- re-initialise variables
> ADDR_ID = -1;
> /* ADDRESS = ''; */
> PER_ADDR_CNT = -1;
> END
> end ^^

Very exhaustive and a lot of useful advices ... ;-)

He also could simply have a cascading delete foreign key constraint on 
PER_ADDRESS referencing ADDRESS.

--
With regards,
Thomas Steinmaurer
http://www.upscene.com

Professional Tools and Services for Firebird
FB TraceManager, IB LogManager, Database Health Check, Tuning etc.





RE: [firebird-support] Why does "IF (NOT(EXISTS(SELECT 1..." not work as expected?

2016-05-12 Thread 'stwizard' stwiz...@att.net [firebird-support]
Greetings Helen,

You're the best.  Unbelievable amount of valuable information packed into
your reply.  I really appreciate the time you took in providing a detailed
reply, as I have learned much from you.

I threw this SP together quickly and actually had just a SUSPEND statement
in this to begin with before I removed it and added all the other stuff,
thus the reason for the return parameters.  My intent was to remove them and
have just a an iAddrID variable.  That's what I get for getting frustrated
and throwing my SP as it was at the present out there.  ;>)

That said, I'll go through your reply again and then see if I can get this
to work.

Thanks again,
Mike



-Original Message-
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] 
Sent: Wednesday, May 11, 2016 11:51 PM
To: 'stwizard' stwiz...@att.net [firebird-support]
Subject: Re: [firebird-support] Why does "IF (NOT(EXISTS(SELECT 1..." not
work as expected?

Hello 'stwizard',

Thursday, May 12, 2016, 12:46:25 AM, you wrote:

> Here is my simple Stored Procedure.  It simply looks for any address 
> in the ADDRESS table that starts with '0 '  as in "0 SE ADAMS ST" and 
> COUNT(*) how many time it might have been used in PER_ADDRESS and if 
> COUNT() > 0 delete the links from the PER_ADDRESS table.

>  

> The next line verifies that there is no remaining links in the 
> PER_ADDRESS table and then deletes the record from the ADDRESS table.

>  

> My problem is that even though ADDR_ID 347006 does not exist in the 
> PER_ADDRESS table, the "IF (NOT(EXISTS(SELECT 1.." line thinks there 
> is and skips the deletion of the record f  orm the ADDRESS table.


> What might I be doing wrong?

First of all, this is an executable SP, not intended to return a result set,
so get rid of the RETURNS parameters and declare variables instead. While
executable SPs *can* return a single-row result set, with your for-loop, the
only result you would get back would be the values from the final iteration
of the loop.  But that's not the reason for your unexpected results.

In your INTO clause, you are missing the colon (:) markers that are needed
when variables or parameters are referred to in a DSQL statement.  I seem to
recall that they are optional in v.2.5 (not
sure) but that would not be a reason for me to omit them.

Your problem is your variables.  With both local variables and parameters
that you are using like variables, you need to

(1) Initialise your variables before starting the loop (they start out as
NULL) and
(2) Re-initialise them at the end of the loop (otherwise, until the next
time the loop gets a "hit", the variables retain the values that existed
after the last "hit").

Also, once you fix those problems, I see no point in adding extra cost by
revisiting the PER_ADDRESS table to verify the non-existence of the records
you just deleted.  If the delete had failed, you would already be in an
exception condition and would have jumped past that block to the last END
statement.

You don't actually need ADDRESS1 in your working set, either, since you
don't do anything with it.

With the correct initialisation/re-initialisation, you already have the
value of ADDR_ID at that point:  either a genuine ID (if the current ADDRESS
format matches the condition) or the dummy value from the initialisation (if
no invalid addresses were found for that ADDR_ID in PER_ADDRESS).

CREATE PROCEDURE P_CLEAN_ADDR
AS
  DECLARE  ADDR_ID Integer = -1;
  /* DECLARE ADDRESS VarChar(50) = ''; not needed */
  DECLARE PER_ADDR_CNT SmallInt = -1;

begin
  FOR SELECT A.ADDR_ID,
 /* A.ADDRESS1, not needed */
 (SELECT COUNT(*) FROM PER_ADDRESS PA
  WHERE PA.ADDR_ID = A.ADDR_ID) AS PER_ADDR_CNT

 FROM ADDRESS A
 WHERE ADDRESS1 STARTING WITH '0 '
 INTO :ADDR_ID, /* :ADDRESS, */ :PER_ADDR_CNT
   DO
   BEGIN
   IF (PER_ADDR_CNT > 0) THEN
   begin
 DELETE FROM PER_ADDRESS WHERE ADDR_ID = :ADDR_ID;
 DELETE FROM ADDRESS WHERE ADDR_ID = :ADDR_ID;
   end
   -- re-initialise variables
   ADDR_ID = -1;
   /* ADDRESS = ''; */
   PER_ADDR_CNT = -1;
   END
end ^^

hth,
Helen











++

Visit http://www.firebirdsql.org and click the Documentation item on the
main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at
http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links





[firebird-support] Why does "IF (NOT(EXISTS(SELECT 1..." not work as expected?

2016-05-11 Thread 'stwizard' stwiz...@att.net [firebird-support]
Greetings All,

 

Firebird 2.5.4

 

Here is my simple Stored Procedure.  It simply looks for any address in the
ADDRESS table that starts with '0 '  as in "0 SE ADAMS ST" and COUNT(*) how
many time it might have been used in PER_ADDRESS and if COUNT() > 0 delete
the links from the PER_ADDRESS table.

 

The next line verifies that there is no remaining links in the PER_ADDRESS
table and then deletes the record from the ADDRESS table.

 

My problem is that even though ADDR_ID 347006 does not exist in the
PER_ADDRESS table, the "IF (NOT(EXISTS(SELECT 1.." line thinks there is and
skips the deletion of the record form the ADDRESS table.  

 

What might I be doing wrong?

 

SET TERM ^^ ;

CREATE PROCEDURE P_CLEAN_ADDR returns (

  ADDR_ID Integer, 

  ADDRESS VarChar(50), 

  PER_ADDR_CNT SmallInt)

AS

begin

  FOR SELECT A.ADDR_ID, 

 A.ADDRESS1,

(SELECT COUNT(*) FROM PER_ADDRESS PA WHERE PA.ADDR_ID =
A.ADDR_ID) AS PER_ADDR_CNT

FROM ADDRESS A 

   WHERE ADDRESS1 STARTING WITH '0 '

INTO ADDR_ID, ADDRESS, PER_ADDR_CNT DO

BEGIN  

  IF (PER_ADDR_CNT > 0) THEN

DELETE FROM PER_ADDRESS PA WHERE PA.ADDR_ID = :ADDR_ID;  



  IF (NOT(EXISTS(SELECT 1

   FROM PER_ADDRESS

  WHERE ADDR_ID = :ADDR_ID))) THEN

  DELETE FROM ADDRESS WHERE ADDR_ID = :ADDR_ID;

END 

end ^^

SET TERM ; ^^



RE: [firebird-support] SQL Error Code -104: What is wrong with this rather simply SQL?

2016-04-07 Thread 'stwizard' stwiz...@att.net [firebird-support]
Arno,

 

Thanks for your pointing out the issue with my SQL statement.

 

Mike

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Wednesday, April 06, 2016 4:36 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] SQL Error Code -104: What is wrong with this 
rather simply SQL?

 

  

Hi,

 

The message doesn’t tell you which expression is not contained in an aggregate 
function or GROUP BY clause, but is very clear that it is “P.PHONE_ID”

 

Not sure what you trying to achieve, but your SQL is indeed invalid, because 
there can be multiple PHONE_ID’s per AREA_CODE, PHONE_NO

 

Kind Regards,
Arno Brinkman

 

 

 

From: mailto:firebird-support@yahoogroups.com 

Sent: Wednesday, April 6, 2016 10:03 PM

To: firebird-support@yahoogroups.com 

Subject: [firebird-support] SQL Error Code -104: What is wrong with this rather 
simply SQL?

 






SELECT DISTINCT P.AREA_CODE, P.PHONE_NO,

  (SELECT COUNT(*) 

FROM PHONE P2 

   WHERE P2.PHONE_ID = P.PHONE_ID) AS CNT

  FROM PHONE P  

WHERE P.AREA_CODE IS NOT NULL 

GROUP BY 1, 2  

HAVING (SELECT COUNT(*) 

  FROM PHONE P3 

 WHERE P3.PHONE_ID = P.PHONE_ID

   AND P3.AREA_CODE IS NOT NULL) > 1

 

Dynamic SQL Error SQL error code = -104 Invalid expression in the select list 
(not contained in either an aggregate function or the GROUP BY clause)





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



RE: [firebird-support] SQL Error Code -104: What is wrong with this rather simply SQL?

2016-04-07 Thread 'stwizard' stwiz...@att.net [firebird-support]
Tomasz,

Thanks for your guidance and explanation for a much simpler solution.

Mike

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Thursday, April 07, 2016 2:58 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] SQL Error Code -104: What is wrong with this 
rather simply SQL?

 

  

On 06.04.2016 o 22:03, 'stwizard' stwiz...@att.net [firebird-support] wrote:
> SELECT DISTINCT P.AREA_CODE, P.PHONE_NO,
>
> (SELECT COUNT(*)
>
> FROM PHONE P2
>
> WHERE P2.PHONE_ID = P.PHONE_ID) AS CNT
>
> FROM PHONE P
>
> WHERE P.AREA_CODE IS NOT NULL
>
> GROUP BY 1, 2

[ ... ]

select A, B, (select count(*) from ...)
from ...

is not the same as

select A, B, count(*)
from ...

In the former case, the sub-select is not an aggregate function. It 
simply calculates and returns a scalar (a single number), which is 
treated just like one more "field" in selected records.
Therefore, for the GROUP BY to work correctly, you'd have to include the 
third selected column (sub-select in your case) in the GROUP BY.
But that's not what you wanted, I suppose.
I guess what you really need is a normal grouped query:

select AREA_CODE, PHONE_NO, count(*)
from PHONE
where AREA_CODE is not null
group by 1, 2
having count(*) > 1

And that'll do the job.

Best regards
Tomasz





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



[firebird-support] SQL Error Code -104: What is wrong with this rather simply SQL?

2016-04-06 Thread 'stwizard' stwiz...@att.net [firebird-support]
SELECT DISTINCT P.AREA_CODE, P.PHONE_NO,

  (SELECT COUNT(*) 

FROM PHONE P2 

   WHERE P2.PHONE_ID = P.PHONE_ID) AS CNT

  FROM PHONE P  

 WHERE P.AREA_CODE IS NOT NULL 

 GROUP BY 1, 2  

HAVING (SELECT COUNT(*) 

  FROM PHONE P3 

 WHERE P3.PHONE_ID = P.PHONE_ID

   AND P3.AREA_CODE IS NOT NULL) > 1

 

Dynamic SQL Error SQL error code = -104 Invalid expression in the select list 
(not contained in either an aggregate function or the GROUP BY clause)



RE: [firebird-support] How do find duplicates in a table?

2016-02-04 Thread 'stwizard' stwiz...@att.net [firebird-support]
I had finally figured it out just before your reply

SELECT DISTINCT P.SOC_SEC_NO,
  (SELECT COUNT(*) 
FROM PERSON P2 
   WHERE P2.SOC_SEC_NO = P.SOC_SEC_NO) AS CNT
  FROM PERSON P  
 WHERE P.SOC_SEC_NO IS NOT NULL 
 GROUP BY 1  
HAVING (SELECT COUNT(*) 
  FROM PERSON P3 
 WHERE P3.SOC_SEC_NO = P.SOC_SEC_NO) > 1

This appears to work.  See anything that I should change?

-Original Message-
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] 
Sent: Thursday, February 04, 2016 1:25 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] How do find duplicates in a table?

04.02.2016 20:09, 'stwizard' stwiz...@att.net [firebird-support] wrote:
> How do I form a SQL Select statement that will return which records in 
> my PERSON table have duplicate SOC_SEC_NO.

   RTFM GROUP BY, HAVING, COUNT().

-- 
   WBR, SD.




[firebird-support] How do find duplicates in a table?

2016-02-04 Thread 'stwizard' stwiz...@att.net [firebird-support]
Greetings All,

 

How do I form a SQL Select statement that will return which records in my 
PERSON table have duplicate SOC_SEC_NO.

 

In other words I need a list of persons where the social security number 
appears in the database more than once.  Some SOC_SEC_NO may be null which I do 
not care about.

 

PERSON:

PERSON_ID

SOC_SEC_NO

 

Any help appreciated,

Mike



RE: [firebird-support] How do find duplicates in a table?

2016-02-04 Thread 'stwizard' stwiz...@att.net [firebird-support]
Thanks Woody much simpler.

 

From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] 
Sent: Thursday, February 04, 2016 1:42 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] How do find duplicates in a table?

Try this instead:

Select Soc_Sec_No, count(*) from Person
group by Soc_Sec_No
having count(*) > 1

This will list the social security numbers and the count if there are 
more than one without
all the additional selects.

HTH
Woody (TMW)





[firebird-support] How to return a count using a SQL Select Statment

2015-11-12 Thread 'stwizard' stwiz...@att.net [firebird-support]
This stored procedure returns:

PREP Shawnee  KS 10/01/2015 - 10/06/2015 248

RES Wyandotte  KS 10/01/2015 - 10/15/2015 4 

 

SET TERM ^^ ;

CREATE PROCEDURE SPS_DOCKET_WORKLIST_LIST returns (

  WORKLIST_NAME VarChar(60), 

  WORKLIST_COUNT SmallInt)

AS

begin

  FOR SELECT DISTINCT WORKLIST_NAME 

FROM DOCKET_WORKLIST

INTO :WORKLIST_NAME DO

BEGIN

  SELECT COUNT(*) 

FROM DOCKET_WORKLIST

   WHERE WORKLIST_NAME = :WORKLIST_NAME

INTO :WORKLIST_COUNT;  



  SUSPEND;  

END

end ^^

SET TERM ; ^^

 

I know there is a way to do this with a SQL select statement.  Can someone 
share how?

 

Thanks,

Mike

 



RE: [firebird-support] How to return a count using a SQL Select Statment

2015-11-12 Thread 'stwizard' stwiz...@att.net [firebird-support]
Ed,

 

So simple wasn’t it ;>)

 

Thanks,

Mike  

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Thursday, November 12, 2015 9:52 AM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] How to return a count using a SQL Select 
Statment

 

  

Mike,

 

You should be able to accomplish this with the use of a group by query.

 

SELECT WORKLIST_NAME,

   COUNT(*) WORKLIST_COUNT

FROM DOCKET_WORKLIST

GROUP BY WORKLIST_NAME  

 

Thanks,

Ed Mendez

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Thursday, November 12, 2015 9:23 AM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] How to return a count using a SQL Select Statment

 

  

This stored procedure returns:

PREP Shawnee  KS 10/01/2015 - 10/06/2015 248

RES Wyandotte  KS 10/01/2015 - 10/15/2015 4 

 

SET TERM ^^ ;

CREATE PROCEDURE SPS_DOCKET_WORKLIST_LIST returns (

  WORKLIST_NAME VarChar(60), 

  WORKLIST_COUNT SmallInt)

AS

begin

  FOR SELECT DISTINCT WORKLIST_NAME 

FROM DOCKET_WORKLIST

INTO :WORKLIST_NAME DO

BEGIN

  SELECT COUNT(*) 

FROM DOCKET_WORKLIST

   WHERE WORKLIST_NAME = :WORKLIST_NAME

INTO :WORKLIST_COUNT;  



  SUSPEND;  

END

end ^^

SET TERM ; ^^

 

I know there is a way to do this with a SQL select statement.  Can someone 
share how?

 

Thanks,

Mike

 





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



RE: [firebird-support] Why can't I have a SUSPEND or UPDATE in the same Stored Procedure?

2015-11-03 Thread 'stwizard' stwiz...@att.net [firebird-support]
I’m sorry I should have been a little bit more concise on what I’m doing.

 

I use Database Workbench v5 for all of my development needs.

 

Running the stored procedure setting the V_REPORT = 1 in Database Workbench, I 
do get a results set.  So far, so good.

 

However, if I set V_REPORT = 0 which should cause the UPDATE to be processed 
instead, I’m not able to commit as the “Commit” and “Rollback”  buttons are not 
enabled.

 

However, If I comment out the first portion (as shone below) leaving just the 
UPDATE clause it works fine and the  “Commit” and “Rollback”  buttons are not 
enabled.

 

/*

  IF (V_REPORT = 1) THEN  

SUSPEND;

  ELSE */

UPDATE ACCT_CASE

   SET LEGAL_CASE_DATE = :ACCH_LEGAL_CASE_DATE 

 WHERE ACCT_ID = :ACCT_ID

   AND CASE_ID = :CASE_ID;

 

Any ideas why?

 

Thanks,

Mike

 

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Tuesday, November 03, 2015 9:29 AM
To: firebird-support@yahoogroups.com
Subject: ODP: [firebird-support] Why can't I have a SUSPEND or UPDATE in the 
same Stored Procedure?

 

  

hi,

 

you got an error or what?

 

 

 

regards,

Karol Bieniaszewski



 Oryginalna wiadomość 
Od: "'stwizard' stwiz...@att.net [firebird-support]" 
<firebird-support@yahoogroups.com> 
Data: 03.11.2015 14:59 (GMT+01:00) 
Do: firebird-support@yahoogroups.com 
Temat: [firebird-support] Why can't I have a SUSPEND or UPDATE in the same 
Stored Procedure? 

  

Greetings All,

 

Firebird v 2.5.4 

 

Many times I would like to run a report before I do an update.  Why can’t I 
allow for both in one stored procedure?  Look at the end of this stored 
procedure where I use V_REPORT.

 

Thanks,

Mike

 

SET TERM ^^ ;

CREATE PROCEDURE X_CHK_LEGAL_CASE_DATE (

  V_REPORT SmallInt)

returns (

  ACCT_ID Integer, 

  CASE_ID SmallInt, 

  LEGAL_CASE_DATE Date, 

  CASE_LEGAL_CASE_DATE Date, 

  ACCH_LEGAL_CASE_DATE Date, 

  ACCH_NOTE VarChar(200))

AS

DECLARE VARIABLE iAcctCaseCourtID Integer; 

begin

  FOR SELECT ACCT_CASE_COURT_ID,

 CAST(CREATE_DATE AS DATE), 

 ACCT_ID, 

 CASE_ID

FROM ACCT_CASE_COURT

   WHERE STATUS_CODE = 'A'   

ORDER BY ACCT_ID, CASE_ID

INTO :iAcctCaseCourtID, :LEGAL_CASE_DATE, :ACCT_ID, :CASE_ID DO

BEGIN 

  SELECT LEGAL_CASE_DATE

FROM ACCT_CASE

   WHERE ACCT_ID = :ACCT_ID

 AND CASE_ID = :CASE_ID

INTO :CASE_LEGAL_CASE_DATE;

 

  IF (CASE_LEGAL_CASE_DATE IS NULL) THEN

BEGIN

  SELECT FIRST 1 CAST(CREATE_DATE AS DATE), NOTE 

FROM ACCT_CASE_COURT_HIST 

   WHERE ACCT_CASE_COURT_ID = :iAcctCaseCourtID

   ORDER BY ACCT_CASE_COURT_HIST_ID   

INTO :ACCH_LEGAL_CASE_DATE, ACCH_NOTE; 

 

  IF (V_REPORT = 1) THEN  

SUSPEND;

  ELSE

UPDATE ACCT_CASE

   SET LEGAL_CASE_DATE = :ACCH_LEGAL_CASE_DATE 

 WHERE ACCT_ID = :ACCT_ID

   AND CASE_ID = :CASE_ID; 

END

END  

end ^^

SET TERM ; ^^





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



[firebird-support] Why can't I have a SUSPEND or UPDATE in the same Stored Procedure?

2015-11-03 Thread 'stwizard' stwiz...@att.net [firebird-support]
Greetings All,

 

Firebird v 2.5.4 

 

Many times I would like to run a report before I do an update.  Why can’t I 
allow for both in one stored procedure?  Look at the end of this stored 
procedure where I use V_REPORT.

 

Thanks,

Mike

 

SET TERM ^^ ;

CREATE PROCEDURE X_CHK_LEGAL_CASE_DATE (

  V_REPORT SmallInt)

returns (

  ACCT_ID Integer, 

  CASE_ID SmallInt, 

  LEGAL_CASE_DATE Date, 

  CASE_LEGAL_CASE_DATE Date, 

  ACCH_LEGAL_CASE_DATE Date, 

  ACCH_NOTE VarChar(200))

AS

DECLARE VARIABLE iAcctCaseCourtID Integer; 

begin

  FOR SELECT ACCT_CASE_COURT_ID,

 CAST(CREATE_DATE AS DATE), 

 ACCT_ID, 

 CASE_ID

FROM ACCT_CASE_COURT

   WHERE STATUS_CODE = 'A'   

ORDER BY ACCT_ID, CASE_ID

INTO :iAcctCaseCourtID, :LEGAL_CASE_DATE, :ACCT_ID, :CASE_ID DO

BEGIN 

  SELECT LEGAL_CASE_DATE

FROM ACCT_CASE

   WHERE ACCT_ID = :ACCT_ID

 AND CASE_ID = :CASE_ID

INTO :CASE_LEGAL_CASE_DATE;

 

  IF (CASE_LEGAL_CASE_DATE IS NULL) THEN

BEGIN

  SELECT FIRST 1 CAST(CREATE_DATE AS DATE), NOTE 

FROM ACCT_CASE_COURT_HIST 

   WHERE ACCT_CASE_COURT_ID = :iAcctCaseCourtID

   ORDER BY ACCT_CASE_COURT_HIST_ID   

INTO :ACCH_LEGAL_CASE_DATE, ACCH_NOTE; 

 

  IF (V_REPORT = 1) THEN  

SUSPEND;

  ELSE

UPDATE ACCT_CASE

   SET LEGAL_CASE_DATE = :ACCH_LEGAL_CASE_DATE 

 WHERE ACCT_ID = :ACCT_ID

   AND CASE_ID = :CASE_ID; 

END

END  

end ^^

SET TERM ; ^^



RE: [firebird-support] How can I see which query within a stored procedure execution takes the longest time?

2015-10-13 Thread 'stwizard' stwiz...@att.net [firebird-support]
Hi Tim,

 

Thanks for the reply.  You mentioned that you did it with a logging
procedure.  Can you share what you exactly what you did to accomplish this?


 

Mike

 

 



[firebird-support] Error while attempting to add a Primary key to a table that has no records

2015-10-01 Thread 'stwizard' stwiz...@att.net [firebird-support]
Greetings,

 

Firebird v2.5.4

 

I use Database Workbench v 5 as my database development tool.

 

I have this table which is currently empty (0 rows).  It originally had a 
primary key on TRUST_STATEMENT_ID and ORIGINAL_PMT_ID

 

CREATE TABLE TRUST_STATEMENT_PMT_BACKOUT_CHK 

(

  TRUST_STATEMENT_ID  INTEGER NOT NULL,

  ORIGINAL_PMT_ID INTEGER NOT NULL,

  ORIGINAL_ACCT_IDINTEGER NOT NULL,

  ORIGINAL_CASE_ID   SMALLINT NOT NULL,

  ORIGINAL_DEBT_NO   SMALLINT NOT NULL,

  ORIGINAL_PMT_NOSMALLINT NOT NULL,

  ORIGINAL_PMT_DATE  DATE NOT NULL,

  ORIGINAL_PMT_AMTNUMERIC( 15, 2) NOT NULL,

  BACKOUT_PMT_ID  INTEGER,

  BACKOUT_PMT_NO SMALLINT,

  BACKOUT_PMT_DATE   DATE,

  BACKOUT_PMT_AMT NUMERIC( 15, 2)

);

 

I drop the PK so I could add 3 new fields (ORIGINAL_ACCT_ID, ORIGINAL_CASE_ID 
and ORIGINAL_DEBT_NO) to this table.

 

Now I’m trying to add a primary key on TRUST_STATEMENT_ID,  ORIGINAL_PMT_ID, 
ORIGINAL_ACCT_ID, ORIGINAL_CASE_ID and ORIGINAL_DEBT_NO

 

But I receive this error:

 

validation error for column ORIGINAL_ACCT_ID, value "*** null ***"

while executing:

ALTER TABLE TRUST_STATEMENT_PMT_BACKOUT_CHK 

 ADD CONSTRAINT PK_TRUST_STATEMENT_PMT_BACK PRIMARY KEY (TRUST_STATEMENT_ID, 
ORIGINAL_PMT_ID, ORIGINAL_ACCT_ID, ORIGINAL_CASE_ID, ORIGINAL_DEBT_NO)

 

Why am I receiving this error and how do I fix it?

 

Mike



RE: [firebird-support] Error while attempting to add a Primary key to a table that has no records

2015-10-01 Thread 'stwizard' stwiz...@att.net [firebird-support]
Hmmm,

 

I tried again this evening and it would allow me to add the primary key.  Very 
strange.  Since we moved to a new windows server 2012 R2 and upgraded to v2.5.4 
firebird running Classic Super Server from v1.5.4 running Classic Server, could 
any of that have anything to do with it?  Could the fact that everyone was 
logged into Firebird have anything to do with it?  The only user that would 
have ever used this table was logged out and gone home for the day or I would 
have never attempted to do it during the day.  There was still one user logged 
in that must of forgot to log out and it let me add the PK now?  

 

Would be interested in anyone’s thoughts,

 

Mike

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Thursday, October 01, 2015 4:04 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Error while attempting to add a Primary key to a 
table that has no records

 

Greetings,

Firebird v2.5.4

I use Database Workbench v 5 as my database development tool.

I have this table which is currently empty (0 rows).  It originally had a 
primary key on TRUST_STATEMENT_ID and ORIGINAL_PMT_ID

CREATE TABLE TRUST_STATEMENT_PMT_BACKOUT_CHK 

(

  TRUST_STATEMENT_ID  INTEGER NOT NULL,

  ORIGINAL_PMT_ID INTEGER NOT NULL,

  ORIGINAL_ACCT_IDINTEGER NOT NULL,

  ORIGINAL_CASE_ID   SMALLINT NOT NULL,

  ORIGINAL_DEBT_NO   SMALLINT NOT NULL,

  ORIGINAL_PMT_NOSMALLINT NOT NULL,

  ORIGINAL_PMT_DATE  DATE NOT NULL,

  ORIGINAL_PMT_AMTNUMERIC( 15, 2) NOT NULL,

  BACKOUT_PMT_ID  INTEGER,

  BACKOUT_PMT_NO SMALLINT,

  BACKOUT_PMT_DATE   DATE,

  BACKOUT_PMT_AMT NUMERIC( 15, 2)

);

I drop the PK so I could add 3 new fields (ORIGINAL_ACCT_ID, ORIGINAL_CASE_ID 
and ORIGINAL_DEBT_NO) to this table.

Now I’m trying to add a primary key on TRUST_STATEMENT_ID,  ORIGINAL_PMT_ID, 
ORIGINAL_ACCT_ID, ORIGINAL_CASE_ID and ORIGINAL_DEBT_NO

But I receive this error:

validation error for column ORIGINAL_ACCT_ID, value "*** null ***"

while executing:

ALTER TABLE TRUST_STATEMENT_PMT_BACKOUT_CHK 

 ADD CONSTRAINT PK_TRUST_STATEMENT_PMT_BACK PRIMARY KEY (TRUST_STATEMENT_ID, 
ORIGINAL_PMT_ID, ORIGINAL_ACCT_ID, ORIGINAL_CASE_ID, ORIGINAL_DEBT_NO)

Why am I receiving this error and how do I fix it?

Mike





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



RE: [firebird-support] How to Extract Filename from file path inside a stored procedure?

2015-09-22 Thread 'stwizard' stwiz...@att.net [firebird-support]
Mark,

 

Thank you and the other gentleman that replied as I was able to create my own 
SP to do exactly what I needed to do and it works in both version of Firebird.

 

Mike

 



[firebird-support] How to Extract Filename from file path inside a stored procedure?

2015-09-17 Thread 'stwizard' stwiz...@att.net [firebird-support]
Greetings All,

 

Firebird v1.5.3 and v2.5.4

 

I need a way to extract just the file name for a given file path either by
code in a stored procedure or by calling a UDF in the stored procedure.

 

Example, I need to extract "SNKSAid.dat" from
"K\Frontline\Documents\Aids\SNKSAid.dat"

 

Any ideas?

 

Thanks,

Mike



RE: [firebird-support] Setting up FreeAdhocUDF on an Ubuntu Server

2015-09-04 Thread 'stwizard' stwiz...@att.net [firebird-support]
Although I cannot help you, you might try this email address
 h...@freeadhocudf.org at www.FreeAdhocUDF.org
as I found them very helpful in getting my issue resolved a few weeks back



RE: [firebird-support] RETURNING_VALUES optional variables?

2015-08-21 Thread 'stwizard' stwiz...@att.net [firebird-support]
Jorge,

 

I have done a SELECT FROM instead of an EXECUTE PROCEDURE when I do not need
all the fields returned in a stored procedure.  This will only work I think
if the SP has a SUSPEND; in it.

   SELECT R_PRINC_BAL, R_FEE_BAL

FROM SPS_CASE_CUR_BAL(:ACCT_ID, :CASE_ID, NULL, 1)

INTO :PRINCIPAL_BAL, :FEE_BAL;

 

Mike

 

 

 

From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] 
Sent: Friday, August 21, 2015 1:08 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] RETURNING_VALUES optional variables?

 

  

I´m calling a stored procedure (SP1) from inside another SP (SP2).
SP2 has three output vars, but when calling it from SP1 I only need one 
value.
It's possible to omit 2nd and 3rd parameters when using EXECUTE PROCEDURE?
(Right now I´m using SP1 local variables whose values are never used).
Thanks!

-- 
Jorge Andrés Brugger
Departamento de Informática
DASU - Obra Social del Personal de la Universidad Nacional de la Patagonia
Comodoro Rivadavia, Chubut, Argentina
Teléfono (0297) 446- int. 103
Correo electrónico: jbrug...@dasu.com.ar
Website: www.dasu.com.ar

Aquel que tiene una opinión de sí mismo, pero depende de la opinión y los
gustos de los demás, es un esclavo (Friedrich Gottlieb Klopstock)

--
Antes de imprimir este mensaje, piense si es verdaderamente necesario
hacerlo.





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



RE: [firebird-support] What is the best way to re-write this Stored Procedure that seems to be SLOW processing? (SOLVED)

2015-08-14 Thread 'stwizard' stwiz...@att.net [firebird-support]
Greetings Set,

 

Set you are truly an asset to this list and in my book rank at the top of the 
list with Helen and Mark.  I have learned so much from you three in the last 
few months.  I of course do not discount any others that send out helpful 
replies as I can learn from all (Trust me).

 

Anyway,  I have modified my stored procedure to implement your suggestion:

 

Then I'd expect a small improvement if you generally changed to

AND PP.STATUS_CODE||'' IN ('G','V')
and
ORDER BY PP.STATUS_CODE||''



It went from 2 hours and 45 minutes down to … get this … under 12 minutes.   WOW

 

Thanks so much for all that have replied.

 

Mike



[firebird-support] What is the best way to re-write this Stored Procedure that seems to be SLOW processing?

2015-08-13 Thread 'stwizard' stwiz...@att.net [firebird-support]
Greetings All,

 

First off, I would like to thank all members of this list for taking the time 
to reply on this list.  Much appreciated…

 

Really need some help on this one folks.  Not sure if this is related to IN, 
NOT IN vs EXISTS, NOT EXISTS or not.

 

I have a main stored procedure (not this one) that currently fetches and 
processes approximately 42000 records in either 6 minutes or 2 hours and 45 
minutes depending on if another secondary stored procedure is called.  This 
main stored procedure will pull all people that need to be sent out in an 
export for skip tracing purposes.  

 

I need help with the secondary stored procedure that is painfully SLOW and 
includes IN and NOT IN.

 

Currently this is in a Firebird v1.5.3 database, but I’m currently in the 
process of preparing to move to v2.5.4.

 

First I’ll provide the basic table structures.  I will not include any fields 
that are not relevant here.

 

PERSON: 

PERSON_IDINTEGER  NOT NULL   PK

 

PHONE:

PHONE_ID  INTEGER  NOT NULL   PK

AREA_CODE   CHAR(3) 
  COLLATE NONE

PHONE_NOCHAR(8)   NOT NULL   
COLLATE NONE

 

PER_PHONE:

PERSON_IDINTEGER  NOT NULL   PK

PHONE_ID  INTEGER  NOT NULL   PK

CREATE_DATE   TIMESTAMP   NOT NULL   DEFAULT 'NOW'  
  

STATUS_CODE  CHAR(1)   NOT NULL   COLLATE 
NONE

DEFAULT_PHONESMALL_INT NOT NULL   DEFAULT 0

LOCATION   VARCHAR(25)  
  COLLATE NONE

 

Purpose of this secondary stored procedure is to:

1)  Find a default verifying or good home phone or alternately a 
non-default good or verify home phone and plug it into position 1.  

2)  Then find a default verifying or good work phone or alternately a 
non-default good or verify work phone and plug it into position 2.  

3)  After that fill in the balance of up to 10 phone numbers with good or 
verifying phones in date created descending order that are not equal to 
iPhoneID1 or iPhoneID2. 

4)  Lastly fill in the balance of up to 10 phone numbers with non(good or 
verifying) phones in date created descending order that are not equal to 
iPhoneID1 or iPhoneID2. 

 

First off as mentioned above if this secondary stored procedure has to be 
called, the time it takes to pull 42000 records jumps from 6 minutes or 2 hours 
and 45 minutes. WOW!!!

 

I experimented a bit with this stored procedure and commented out all but 
pulling the first phone number.  Time jumped from 6 minutes to 36 minutes.  
Then I tried commenting out all but pulling the first two phone numbers.  Time 
jumped from 6 minutes to (Well over 78 minutes so far, as it is still running).

 

Please note that I can run this stored procedure in Database Workbench where I 
plug in a person ID I know will return the maximum of ten phone numbers and it 
return results instantly with no pause or delay at all, so this has me baffled.

 

Here is the store procedure.  Is there a better way to do this?

 

Thanks to all,

Mike

 

/*

  Author   : Michael G. Tuttle

  Date : 12.19.12

  Purpose  : Phone 1 = Home Phone (If available)

 Phone 2 = Work Phone (If available)

 Phone 3 - 10 = Any Good or Verifying Phones

*/

DECLARE VARIABLE iPhoneID1 INTEGER;

DECLARE VARIABLE iPhoneID2 INTEGER;

DECLARE VARIABLE sAreaCode CHAR(3);

DECLARE VARIABLE sPhoneNo CHAR(7);

begin

  iPhoneID1 = 0;

  iPhoneID2 = 0;

 

  /* Try to find a default good or verifying home phone */

  SELECT P.PHONE_ID,

 P.AREA_CODE,

 F_STRIPSTRING(P.PHONE_NO,'-') AS PHONE_NO

FROM PER_PHONE PP

JOIN PHONE P ON P.PHONE_ID = PP.PHONE_ID

   WHERE PP.PERSON_ID = :V_PERSON_ID

 AND PP.DEFAULT_PHONE = 1

 AND PP.LOCATION = 'Home'

 AND PP.STATUS_CODE IN ('G','V')

INTO :iPhoneID1, :AREA_CODE1, :PHONE_NO1;

 

  IF (PHONE_NO1 IS NULL) THEN

BEGIN

  /* If no default home phone, then try to find a non-default good or 
verifying home phone*/

  SELECT FIRST 1

 P.PHONE_ID,

 P.AREA_CODE,

 F_STRIPSTRING(P.PHONE_NO,'-') AS PHONE_NO

FROM PER_PHONE PP

JOIN PHONE P ON P.PHONE_ID = PP.PHONE_ID

   WHERE PP.PERSON_ID = :V_PERSON_ID

 AND PP.LOCATION = 'Home'

 AND PP.STATUS_CODE IN ('G','V')

 ORDER BY PP.STATUS_CODE

INTO :iPhoneID1, :AREA_CODE1, :PHONE_NO1;

END

 

  /* Try to find a default good or verifying work phone */

  SELECT P.PHONE_ID,

 P.AREA_CODE,

 F_STRIPSTRING(P.PHONE_NO,'-') AS PHONE_NO

FROM PER_PHONE PP

JOIN PHONE P ON P.PHONE_ID = PP.PHONE_ID

   WHERE 

RE: [firebird-support] Upgrade Firebird 1.5.3 to 2.5.4 - function F_STRINGLENGTH is not defined

2015-08-10 Thread 'stwizard' stwiz...@att.net [firebird-support]
Helen,

 

Thanks for all the time you took to share your ideas in this post and the
prior concerning this issue.

 

I was NOT able to use this:

 

ALTER EXTERNAL FUNCTION funcname
[ENTRY_POINT 'new_entry_point']
[MODULE_NAME 'new_library_name'];



It would allow me to do this, but I was still getting the error.

 

Instead I had to the following:

1)  Rename all RDB$DEPENDED_ON_NAME in the RDB$DEPENDENCIES table where
RDV$DEPENED_ON_TYPE = 15

 

/* Change the name of all existing UDF's to prefix them with
'xyz'.  This allows us to successfully drop the FreeUDFLib functions */

   UPDATE RDB$DEPENDENCIES SET RDB$DEPENDED_ON_NAME = 'xyz' ||
RDB$DEPENDED_ON_NAME   WHERE RDB$DEPENDED_ON_TYPE = 15;

 

2)  Drop all external functions (All had to be named)

DROP EXTERNAL FUNCTION F_BLOBMAXSEGMENTLENGTH;

DROP EXTERNAL FUNCTION F_BLOBSEGMENTCOUNT;

.

 

3)  Install fresh FreeAdhocUDF library

 

4)  Then finally restore all RDB$DEPENDED_ON_NAME in the
RDB$DEPENDENCIES table.

 

/* Activate the (old) dependendies */

UPDATE RDB$DEPENDENCIES

SET RDB$DEPENDED_ON_NAME = F_REPLACESTRING(RDB$DEPENDED_ON_NAME, 'xyz', '',
0, 0)

WHERE RDB$DEPENDED_ON_TYPE = 15 AND RDB$DEPENDED_ON_NAME STARTING WITH
'xyz';   

 

After this I did a compile all procedures and triggers and it appears I had
success.

 

Of course all of this was on a metadata only restore.

 

I created a script to handle all of this when ready to do it again.

 

Thanks, for all you help.

Mike 



[firebird-support] Upgrade Firebird 1.5.3 to 2.5.4 - function F_STRINGLENGTH is not defined

2015-08-07 Thread 'stwizard' stwiz...@att.net [firebird-support]
Greetings All,

 

On a new Windows 7 64 bit computer I installed Firebird v2.5.4 64 bit

I then installed the FreeUDFLib 64bit functions

 

I then did a firebird v1.5.3 backup of the metadata only and then restored this 
on firebird v2.5.4.  

I made sure to use the following switches during the restore

-FIX_FSS_D(ATA) charset -- fix malformed UNICODE_FSS data

-FIX_FSS_M(ETADATA) charset -- fix malformed UNICODE_FSS metadata

 

Everything appears to be fine as the restore was successful.

 

I decide to try to compile a stored procedure that used F_STRINGLENGTH and got 
the following error:

 

 invalid request BLR at offset 130

function F_STRINGLENGTH is not defined

module name or entrypoint could not be found

Error while parsing procedure DATETIME_TO_STR's BLR

 

I verified that the function is defined with the following:

select * from rdb$functions where upper(rdb$function_name) = 'F_STRINGLENGTH'

 

It return one record with the following values:

RDB$FUNCTION_NAME: F_STRINGLENGTH

RDB$FUNCTION_TYPE: 0

RDB$QUERY_NAME: Empty String

RDB$DESCRIPTION: null

RDB$MODULE_NAME: FreeUDFLib

RDB$ENTRYPOINT: StringLength

RDB$RETURN_ARGUMENT: 0

RDB$SYSTEM_FLAG: 0

 

What could the issue be?

 

Thanks,

Mike

 



RE: [firebird-support] Upgrade Firebird 1.5.3 to 2.5.4 - function F_STRINGLENGTH is not defined

2015-08-07 Thread 'stwizard' stwiz...@att.net [firebird-support]
Correction:

 

I met to say I then installed FreeAdhocUDF not FreeUDFLib library.

 

And according to their website I also install the 4 icu*44FAU.dll files to the 
Bin folder.

http://freeadhocudf.org/documentation_english/dok_eng_icu.html

 

I’ve rebooted the computer too, so I’m at a loss 

 

Anyone that installed these functions please help if you have any ideas,

Mike

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Friday, August 07, 2015 1:37 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Upgrade Firebird 1.5.3 to 2.5.4 - function 
F_STRINGLENGTH is not defined
Importance: High

 

  

Greetings All,

 

On a new Windows 7 64 bit computer I installed Firebird v2.5.4 64 bit

I then installed the FreeUDFLib 64bit functions

 

I then did a firebird v1.5.3 backup of the metadata only and then restored this 
on firebird v2.5.4.  

I made sure to use the following switches during the restore

-FIX_FSS_D(ATA) charset -- fix malformed UNICODE_FSS data

-FIX_FSS_M(ETADATA) charset -- fix malformed UNICODE_FSS metadata

 

Everything appears to be fine as the restore was successful.

 

I decide to try to compile a stored procedure that used F_STRINGLENGTH and got 
the following error:

 

 invalid request BLR at offset 130

function F_STRINGLENGTH is not defined

module name or entrypoint could not be found

Error while parsing procedure DATETIME_TO_STR's BLR

 

I verified that the function is defined with the following:

select * from rdb$functions where upper(rdb$function_name) = 'F_STRINGLENGTH'

 

It return one record with the following values:

RDB$FUNCTION_NAME: F_STRINGLENGTH

RDB$FUNCTION_TYPE: 0

RDB$QUERY_NAME: Empty String

RDB$DESCRIPTION: null

RDB$MODULE_NAME: FreeUDFLib

RDB$ENTRYPOINT: StringLength

RDB$RETURN_ARGUMENT: 0

RDB$SYSTEM_FLAG: 0

 

What could the issue be?

 

Thanks,

Mike

 





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



[firebird-support] Upgrade Firebird 1.5.3 to 2.5.4 - Character Set and Collations

2015-07-31 Thread 'stwizard' stwiz...@att.net [firebird-support]
Greetings All,

 

I recently did a metadata only backup of my Firebird 1.5.3 database.  

Please note this database has a character set of NONE and anywhere where this 
could be set has remained NONE and no Collation was set either.

NOTE: We DO NOT use BLOBs we use VarChar for our memo fields.

 

On a new computer I installed Firebird 2.5.4 and all required external UDFs.

 

I then attempted to do a metadata only restore using the NONE Character Set as 
follows:

gbak -r -p 8192 -v -fix_fss_d NONE -fix_fss_m NONE -user SYSDBA -pas masterkey 
C:\Frontline\CollectingIT\Database\COLLECTINGIT.bak 
C:\Frontline\CollectingIT\Database\CollectingIT_METADATA_RESTORE.fdb

 

and it failed with this error:

 

gbak:restoring table CR_COMPLIANCE_CONDITION 

Error: Invalid metadata detected. Use -FIX_FSS_METADATA option.

Malformed string

Exiting before completion due to errors

 

This I tried using ASCII for the character set and it failed with this error:

 

gbak:restoring stored procedure SPS_CLEAR_BKRCY_ON_HOLD_STATUS 

Error: Cannot transliterate character between character sets

gds_$put_segment failed

Exiting before completion due to errors

 

Then I tried UTF8 and receive the same error as above.

 

Then I tried ISO8859_1 which was my last hope and it worked.  Not sure why the 
other three failed.

 

Questions:

1I assume this is only changing the character set for the 
PSQL (Stored Procedures, Triggers, etc.) to Firebird v2.5.4 standards is that 
right and if so is it OK to use this character set?

2We are located in the central part of the U.S. and need 
English only (or only characters that can be entered on a standard U.S. 
keyboard), so is it OK to keep the character set as NONE?

a.   Would it be better to change it to another character set and if so 
which one would be best for English?  If changing to another character set I 
need to be sure it will not change any existing data, nor affect the length of 
data that can be stored in the field.

b.  If it is recommended to change is there a way to update the entire 
database at once?  

 

Then this brings up the Collation setting on what is best to use with the 
character set chosen and how to change that for the entire database at once.

 

Any tips on any documents to review would be nice as well.

 

Thanks to any and all who take the time to reply.

 

Mike



 

 

 

 

 

 

 

 

 

 



RE: [firebird-support] Upgrade Firebird 1.5.3 to 2.5.4 - Sub-Selects that reference the same tables

2015-07-30 Thread 'stwizard' stwiz...@att.net [firebird-support]
Set,

 

I had to search for what a CTE was as I have not heard of it and no wonder it 
(CTE Common Table Expression) was introduced in Firebird v2.1 although it was 
available in other SQL Server engines for years.  This looks to be of great 
interest to me once we are up and running on v2.5.4.  I’ll hold onto this and 
try it in the future.

 

Thanks also for the info on placement of my LEFT JOIN’s.  Always learning I 
guess.  I’ve been a Delphi developer since 1997 and over the years had to learn 
Firebird a little at a time as another developer always did most of the 
database development, but I would always step in and see if I could do things 
myself first.  Then that developer left in 2008 and it was all up to me.  We 
have never had a corrupt firebird database in all these years and the database 
size it around 22gb currently.

 

Thanks,

Mike

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Tuesday, July 28, 2015 3:39 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Upgrade Firebird 1.5.3 to 2.5.4 - Sub-Selects 
that reference the same tables

 

  

 Greetings All,
 The select and sub-select both references ACCT_CASE_COURT_PERSON ACCP 
and JOIN ACCT_CASE_COURT ACC.
 This did work in Firebird 1.5.3, will it work in 2.5.4 or should the 
sub-select be referenced with this?
 ACCT_CASE_COURT_PERSON ACCP2 and JOIN ACCT_CASE_COURT ACC2.

 SELECT DISTINCT ACCP.ACCT_CASE_COURT_ID,
 ACC.CASE_NUMBER,
 ACC.CASE_DIVISION_NUMBER,
 ACC.CASE_NUMBER_MASK_ID,
 (SELECT CAST(LCNM.MASK || ';1; ' AS VARCHAR(30))
 FROM LEGAL_CASE_NUMBER_MASK LCNM
 WHERE LCNM.MASK_ID = ACC.CASE_NUMBER_MASK_ID) AS 
CASE_NUMBER_MASK,
 ACCP.STATUS_CODE
 FROM ACCT_CASE_COURT_PERSON ACCP
 JOIN ACCT_CASE_COURT ACC ON ACC.ACCT_CASE_COURT_ID = 
ACCP.ACCT_CASE_COURT_ID
 JOIN ACCT_CASE AC ON AC.ACCT_ID = ACC.ACCT_ID
 AND AC.CASE_ID = ACC.CASE_ID
 WHERE ACC.ACCT_CASE_COURT_ID = (SELECT MAX(ACCP.ACCT_CASE_COURT_ID)
 FROM ACCT_CASE_COURT_PERSON ACCP
 JOIN ACCT_CASE_COURT ACC ON 
ACC.ACCT_CASE_COURT_ID = ACCP.ACCT_CASE_COURT_ID
 JOIN ACCT_TRAN_DETAIL ATD ON 
ATD.ACCT_TRAN_ID = ACC.ACCT_TRAN_ID
 AND ATD.QUE_STATUS_CODE  'B'
 WHERE ACCP.ACCT_ID = :V_ACCT_ID
 AND ACCP.CASE_ID = :CASE_ID
 AND ACCP.PERSON_ID = :iPersonID
 AND ACC.STATUS_CODE = 'D')
 INTO :iAcctCaseCourtID, :sCaseNumber, :sCaseDivisionNumber, 
:iCaseNumberMaskID, :sCaseNumberMask, :sDebtorCaseStatusCode;

Hi Mike!

It would surprise me if Fb 1.5.3 and 2.5.4 worked differently in this 
regard, but I've never used subselects exactly the way you have here, 
and don't know. However, regardless of whether it works or not, I would 
recommend you to change your query to take advantage of CTEs. I'd expect 
the following SQL to perform considerably better if there are lots of 
ACCT_CASE_COURT_IDs (I expect Fb 1.5 to calculate MAX for each possible 
tuple to return, whereas the CTE in Fb 2.5 should only calculate it 
once). Moreover, the CTE has the very positive side effect that it 
removes the possible ambiguity that your question addresses:

WITH TMP(ACCT_CASE_COURT_ID) AS
(SELECT MAX(ACCP.ACCT_CASE_COURT_ID)
FROM ACCT_CASE_COURT_PERSON ACCP
JOIN ACCT_CASE_COURT ACC ON ACC.ACCT_CASE_COURT_ID = 
ACCP.ACCT_CASE_COURT_ID
JOIN ACCT_TRAN_DETAIL ATD ON ATD.ACCT_TRAN_ID = ACC.ACCT_TRAN_ID
AND ATD.QUE_STATUS_CODE  'B'
WHERE ACCP.ACCT_ID = :V_ACCT_ID
AND ACCP.CASE_ID = :CASE_ID
AND ACCP.PERSON_ID = :iPersonID
AND ACC.STATUS_CODE = 'D')

SELECT DISTINCT ACCP.ACCT_CASE_COURT_ID,
ACC.CASE_NUMBER,
ACC.CASE_DIVISION_NUMBER,
ACC.CASE_NUMBER_MASK_ID,
CAST(LCNM.MASK || ';1; ' AS VARCHAR(30)) AS CASE_NUMBER_MASK,
ACCP.STATUS_CODE
FROM ACCT_CASE_COURT_PERSON ACCP
JOIN ACCT_CASE_COURT ACC ON ACC.ACCT_CASE_COURT_ID = ACCP.ACCT_CASE_COURT_ID
JOIN ACCT_CASE AC ON AC.ACCT_ID = ACC.ACCT_ID
AND AC.CASE_ID = ACC.CASE_ID
JOIN TMP T ON ACC.ACCT_CASE_COURT_ID = T.ACCT_CASE_COURT_ID
LEFT JOIN LEGAL_CASE_NUMBER_MASK LCNM
ON LCNM.MASK_ID = ACC.CASE_NUMBER_MASK_ID
INTO :iAcctCaseCourtID, :sCaseNumber, :sCaseDivisionNumber, 
:iCaseNumberMaskID, :sCaseNumberMask, :sDebtorCaseStatusCode;

The LEFT JOIN isn't actually required, you may keep that part as a 
subselect if you prefer. I kept the LEFT JOIN in the format you seem to 
prefer, with the right table to the left of the comparison. Myself, I 
normally write things the opposite way (left table on the left side and 
right table on the right side and not left table on the right side and 
right table on the left side), but that's just due to me preferring it 
that way and there's nothing wrong in doing it the way you do. One 
important thing with LEFT JOINs, however, is to put them after the 
[inner] JOINs, since the optimizer only reorder tables in the plan until 
the first LEFT JOIN it finds in the query.

HTH,
Set





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



RE: [firebird-support] Upgrade Firebird 1.5.3 to 2.5.4 - Using 2.5.4 FB Client to access a 1.5.3 DB database (Follow-Up)

2015-07-30 Thread 'stwizard' stwiz...@att.net [firebird-support]
Thanks Helen,

I understand now.  Thank you for the detailed explanation.

Mike

 

From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] 
Sent: Wednesday, July 29, 2015 5:43 PM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] Upgrade Firebird 1.5.3 to 2.5.4 - Using
2.5.4 FB Client to access a 1.5.3 DB database (Follow-Up)

 

At 08:36 a.m. 30/07/2015, 'stwizard' stwiz...@att.net [firebird-support]
wrote:

The new Windows 2012 R2 64 bit server will have the 64 bit Firebird server
v2.5.4 install on it (But alternately may have Firebird 32 bit server
installed instead based on the answers given below).

All client work stations are Windows 7 64 bit and currently have the
Firebird 1.5.3 32 bit fbclient.dll installed on them and they all currently
use the Windows 2003 32 bit server with Firebird 1.5.3 Server running on it.
The application written in Delphi XE5 that connects to the Firebird server
is currently a 32 bit application. Will be a ways down the road before
releasing a 64 bit version of the application.

So questions:

1) Since the application is a 32 bit application, should I install the 32
bit version of the Firebird server or is it OK to install the 64 bit
Firebird server on the Windows 2012 R2 64 bit server?

The 32-bit clients can access the 64-bit server.

2) If I should be installing the 32 bit version of Firebird Server on the
Windows 2012 R2 64 bit server, then I would assume I would uninstall the
current 1.5.3 32 bit Firebird Client and install the new 2.5.4 32 bit
Firebird client, right? 

Just trying to sort out what you're asking here. You use a 32-bit client
with a 32-bit application. So you'll want the 64-bit client on the *server*
to use the shipped tools locally. 

You don't have to uninstall the client library, just delete it (or rename
it, if there's a reason you want to keep it). The v.2.5.4 client will
communicate with any database = ODS 11.2.

If you want to run the shipped tools on the 64-bit client boxes, you'll need
the 64-bit client there, too. So put the tools and the 64-bit client and
firebird.msg together in a folder that your PATH variable doesn't know
about.

 If I was to install a 64 bit Firebird client on the Windows 7
workstations, would it work with either a 32 bit or 64 bit firebird server
on the Windows 2012 R2 server?

Yes.

 And would the 64 bit Firebird client on the Windows 7 workstations, work
with the 32 bit 1v.5.3 firebird server on the old Windows 2003 32 server?

Yes. But the 64-bit client won't work with your 32-bit applications. The
client belongs to the client layer, not the server layer.

Helen Borrie, Support Consultant, IBPhoenix (Pacific)
Author of The Firebird Book and The Firebird Book Second Edition
http://www.firebird-books.net
__ 





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



RE: [firebird-support] Upgrade Firebird 1.5.3 to 2.5.4 - Using 2.5.4 FB Client to access a 1.5.3 DB database (Follow-Up)

2015-07-29 Thread 'stwizard' stwiz...@att.net [firebird-support]
Thanks Neil for your reply,

 

Thanks to all who take the time to reply to the following.

 

I have a follow up question that goes along with this subject and of course 
anyone can chime in.

 

The new Windows 2012 R2 64 bit server will have the 64 bit Firebird server 
v2.5.4 install on it (But alternately may have Firebird 32 bit server installed 
instead based on the answers given below).

 

All client work stations are Windows 7 64 bit and currently have the Firebird 
1.5.3 32 bit fbclient.dll installed on them and they all currently use the 
Windows 2003 32 bit server with Firebird 1.5.3 Server running on it.  The 
application written in Delphi XE5 that connects to the Firebird server is 
currently a 32 bit application.  Will be a ways down the road before releasing 
a 64 bit version of the application.

 

So questions:

1)  Since the application is a 32 bit application, should I install the 32 
bit version of the Firebird server or is it OK to install the 64 bit Firebird 
server on the Windows 2012 R2 64 bit server?

2)  If I should be installing the 32 bit version of Firebird Server on the 
Windows 2012 R2 64 bit server, then I would assume I would uninstall the 
current 1.5.3 32 bit Firebird Client and install the new 2.5.4 32 bit Firebird 
client, right?  

Bottom line is:

  If I was to install a 64 bit Firebird client on the Windows 7 workstations, 
would it work with either a 32 bit or 64 bit firebird server on the Windows 
2012 R2 server?  

 And would the 64 bit Firebird client on the Windows 7 workstations, work with 
the 32 bit 1v.5.3 firebird server on the old Windows 2003 32 server?

 

I guess all can tell I’m a little confused on if 32 bit and 64 bit Firebird 
server/client can be mixed and matched for v2.5.4 and if whatever is placed 
onto the work stations would be able to connect to v1.5.3 Firebird server 
running on the old windows 2003 32 bit server.

 

Any help is really appreciated and of course if I need to clarify please ask.

 

Mike

 

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Wednesday, July 29, 2015 4:13 AM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] Upgrade Firebird 1.5.3 to 2.5.4 - Using 2.5.4 
FB Client to access a 1.5.3 DB database

 

  

Hi Mike,

 

I don’t have direct experience of using FB Client v2.5 to access v1.5 databases 
but my understanding is that it should work okay for you. We certainly access 
v2.1 databases with the v2.5 client okay and accessed v1.5 databases with the 
v2.1 client without issue. 

 

From what I have read and experienced the clients are backwards compatible but 
you have to be careful accessing a newer database with an older client which 
doesn’t usually end well.

 

I believe you would need to uninstall the v1.5 client first, then reinstall the 
v2.5 one.

 

Cheers,

 

Neil Pickles - n...@csy.co.uk




Greetings All,

We are installing a new Windows 2012 R2 64 bit server at the office and 
eventually will restore a Firebird 1.5.3 Database to 2.5.4

On one windows 7 64 bit client I will install the 2.5.4 firebird client.

A few questions:

1)  Do I need to uninstall the 1.5.3 client first?

2)  After the 2.5.4 client is install and I’m able to access the new 2012 
server successfully, can this same firebird client be used to connect to the 
old firebird 1.5.3 database on the 2003 windows server?

Thanks,

Mike

 

 





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



RE: [firebird-support] Upgrade Firebird 1.5.3 to 2.5.4 - CHECK Constraint Change Question

2015-07-24 Thread 'stwizard' stwiz...@att.net [firebird-support]
Thanks Mark

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Thursday, July 23, 2015 8:22 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Upgrade Firebird 1.5.3 to 2.5.4 - CHECK 
Constraint Change Question

 

  

On Thu, 23 Jul 2015 08:15:35 -0500, 'stwizard' stwiz...@att.net
[firebird-support] firebird-support@yahoogroups.com wrote:
 Greetings All,
 
 In the Firebird 2 Migration  Installation guide 

http://www.firebirdsql.org/file/documentation/release_notes/Firebird-2_1_6-I
 nstallation.pdf
 on page 4 it states the following:
 
 CHECK Constraint Change
 Formerly, CHECK constraints were not SQL standard-compliant in regard
to
 the handling of NULL. For example, 
 CHECK (DEPTNO IN (10, 20, 30)) 
 should allow NULL in the DEPTNO column but it did not.
 
 In Firebird 2.0, if you need to make NULL invalid in a CHECK
constraint,
 you must do so explicitly by extending the constraint. Using the example
 above:
 CHECK (DEPTNO IN (10, 20, 30) AND DEPTNO IS NOT NULL)
 
 I have a field called FTP_FORCE_LOWER_CASE defined as SmallInt Not Null
 with
 the following constraint
 
 /* (0) False, (1) True */
 FTP_FORCE_LOWER_CASE IN (0, 1)
 
 Do I need to change it to this even though the Not Null column is
checked? 
 /* (0) False, (1) True */
 FTP_FORCE_LOWER_CASE IN (0, 1) AND FTP_FORCE_LOWER_CASE IS NOT NULL

No, you don't need to change it, it is already enforced by the NOT NULL
constraint. The note in the release notes is just to let you know what to
check for if your application depended on the old behavior (intentionally
or unintentionally).

Mark





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



RE: [firebird-support] Migration Guide for Firebird 1.5.3 to 2.5.4

2015-07-24 Thread 'stwizard' stwiz...@att.net [firebird-support]
Thanks Mark

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Thursday, July 23, 2015 7:40 AM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] Migration Guide for Firebird 1.5.3 to 2.5.4

 

  

On Thu, 23 Jul 2015 07:16:18 -0500, 'stwizard' stwiz...@att.net
[firebird-support] firebird-support@yahoogroups.com wrote:
 Thank you Helen for your reply,
 
 I'll do as you suggest and read the release notes (in order) and I may
have
 question after reading them.

Just know that upgrading the database (apart from the metadata character
set upgrade) is probably the least of your worries. Make sure you test your
applications intensively before doing a production upgrade.

 Should I continue to ask all my questions in this thread or should I ask
 each in a separate post?

That is up to you, but I'd start a new thread for a new question.

 For Instance, I do have a few questions currently:
 
 1) The Character Set of my current database is NONE. Is this OK or
should
 I
 set it to something else? Or it this done automatically during the
 restore?

The restore doesn't change the default character set of a database, NONE
is a valid default and switching that to something else can have
implications that only you and your application developers can check.

 2) The database I want to upgrade is 25,231,544 KB, so I have a
question.
 Is it possible to do a metadata only backup followed by a restore of the
 metadata only in 2.5.4 to see if there are any issues with Stored
 procedure,
 Triggers, constraints, keywords, etc before attempting the full backup
 and
 restore?

Yes:
http://www.firebirdsql.org/file/documentation/reference_manuals/user_manuals/html/gbak-recipies.html#gbak-recipies-metadata

Mark





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



[firebird-support] Upgrade Firebird 1.5.3 to 2.5.4 - Existence Predicates NOT IN Question

2015-07-24 Thread 'stwizard' stwiz...@att.net [firebird-support]
Greetings All,

In the Firebird 2 Migration  Installation guide 
 
http://www.firebirdsql.org/file/documentation/release_notes/Firebird-2_1_6-Installation.pdf
 
http://www.firebirdsql.org/file/documentation/release_notes/Firebird-2_1_6-Installation.pdf
 
on page 8 under the performance section it states the following:

 

The following changes should be noted as possible sources of performance loss:

Existence Predicates NOT IN and ALL May Be Slow

 

Firebird and, before that, InterBase, have produced incorrect results for the 
logical existence predicates ALL and NOT IN for many years. That problem has 
been corrected in Firebird 2.0, but the change means that indexes on the inner 
tables cannot be used and performance may be slow compared to the same query's 
performance in V.1.5. “Inner tables” are the tables used in the subquery 
argument inside an ALL or NOT IN expression.

 

So my questions:

 

This only applies when there is a JOIN in the SQL statement correct?

 

In other words it does not apply to a stored procedure like the following does 
it?

 

SET TERM  ^^ ;

CREATE PROCEDURE SPS_ATTORNEY_STATE (

  V_ATTORNEY_ID Integer)

returns (

  R_ASSOCIATED SmallInt,

  R_ATTORNEY_ID Integer,

  R_STATE_CODE Char(2),

  R_STATE_NAME VarChar(35),

  R_CREATE_DATE TimeStamp,

  R_CREATE_USER SmallInt,

  R_MODIFY_DATE TimeStamp,

  R_MODIFY_USER SmallInt,

  R_COURT_NO VarChar(10))

AS

/*

  Author   : Michael Tuttle

  Date : 10/02/2006

  Purpose  :

*/

begin

  FOR SELECT CAST(1 AS SMALLINT) AS ASSOCIATED,

 A.ATTORNEY_ID,

 A.STATE_CODE,

 S.NAME AS STATE_NAME,

 A.CREATE_DATE,

 A.CREATE_USER,

 A.MODIFY_DATE,

 A.MODIFY_USER,

 A.COURT_NO

FROM ATTORNEY_STATE A

JOIN STATE S ON S.STATE_CODE = A.STATE_CODE

   WHERE A.ATTORNEY_ID = :V_ATTORNEY_ID

 

UNION

 

  SELECT CAST(0 AS SMALLINT) AS ASSOCIATED,

 CAST(:V_ATTORNEY_ID AS INTEGER) AS ATTORNEY_ID,

 S.STATE_CODE,

 S.NAME AS STATE_NAME,

 CAST(NULL AS TIMESTAMP) AS CREATE_DATE,

 CAST(NULL AS SMALLINT) AS CREATE_USER,

 CAST(NULL AS TIMESTAMP) AS MODIFY_DATE,

 CAST(NULL AS SMALLINT) AS MODIFY_USER,

 CAST(NULL AS VARCHAR(10)) AS COURT_NO

FROM STATE S

   WHERE S.STATE_CODE NOT IN (SELECT A2.STATE_CODE

FROM ATTORNEY_STATE A2

   WHERE A2.ATTORNEY_ID = :V_ATTORNEY_ID)

 

  INTO :R_ASSOCIATED, :R_ATTORNEY_ID, :R_STATE_CODE, :R_STATE_NAME, 
:R_CREATE_DATE, :R_CREATE_USER, :R_MODIFY_DATE, :R_MODIFY_USER, :R_COURT_NO DO

BEGIN

  SUSPEND;

END

end

^^

SET TERM ;  ^^

 

Thanks,

Mike



RE: [firebird-support] Upgrade Firebird 1.5.3 to 2.5.4 - Existence Predicates NOT IN Question

2015-07-24 Thread 'stwizard' stwiz...@att.net [firebird-support]
Set, thank you for the very detailed response as it is VERY helpful and 
informative.  

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Friday, July 24, 2015 7:49 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Upgrade Firebird 1.5.3 to 2.5.4 - Existence 
Predicates NOT IN Question

 

  

Existence Predicates NOT IN and ALL May Be Slow

Firebird and, before that, InterBase, have produced incorrect results 
for the logical existence predicates ALL and NOT IN for many years.
That problem has been corrected in Firebird 2.0, but the change means 
that indexes on the inner tables cannot be used and performance
may be slow compared to the same query's performance in V.1.5. “Inner 
tables” are the tables used in the subquery argument inside an
ALL or NOT IN expression.

So my questions:

This only applies when there is a JOIN in the SQL statement correct?
In other words it does not apply to a stored procedure like the 
following does it?

Hi Mike!

On www.firebirdsql.org/manual/nullguide-predicates.html, I find

Bug alert

All Firebird versions before 2.0 contain a bug that causes [NOT] IN to 
return the wrong result if an index is active on the subselect and one 
of the following conditions is true:

A is NULL and the subselect doesn't return any NULLs, or
A is not NULL and the subselect result set doesn't contain A but does 
contain NULL(s).
Please realise that an index may be active even if it has not been 
created explicitly, namely if a key is defined on A.

Example: Table TA has a column A with values { 3, 8 }. Table TB has a 
column B containing { 2, 8, 1, NULL }. The expressions:

A [not] in ( select B from TB )
should both return NULL for A = 3, because of the NULL in B. But if B is 
indexed, IN returns false and NOT IN returns true. As a result, the query

select A from TA where A not in ( select B from TB )
returns a dataset with one record – containing the field with value 3 – 
while it should have returned an empty set. Other errors may also occur, 
e.g. if you use “NOT IN” in an IF, CASE or WHILE statement.

which I assume to be the error you're talking about. So, yes, it can 
apply to cases like the procedure you describe.

One of the first things I learnt when starting with InterBase/Firebird, 
was to never use IN (subselect) - it took far longer than I expected. 
This was either with InterBase 5.6 or Firebird 0.9.4, but I've never had 
a need for IN (subselect) since I learnt about EXISTS. So, I'd 
recommend you to change your SP to:

SET TERM ^^ ;
CREATE PROCEDURE SPS_ATTORNEY_STATE (
V_ATTORNEY_ID Integer)
returns (
R_ASSOCIATED SmallInt,
R_ATTORNEY_ID Integer,
R_STATE_CODE Char(2),
R_STATE_NAME VarChar(35),
R_CREATE_DATE TimeStamp,
R_CREATE_USER SmallInt,
R_MODIFY_DATE TimeStamp,
R_MODIFY_USER SmallInt,
R_COURT_NO VarChar(10))
AS
/*
Author : Michael Tuttle
Date : 10/02/2006
Purpose :
*/
begin
FOR SELECT CAST(1 AS SMALLINT) AS ASSOCIATED,
A.ATTORNEY_ID,
A.STATE_CODE,
S.NAME AS STATE_NAME,
A.CREATE_DATE,
A.CREATE_USER,
A.MODIFY_DATE,
A.MODIFY_USER,
A.COURT_NO
FROM ATTORNEY_STATE A
JOIN STATE S ON S.STATE_CODE = A.STATE_CODE
WHERE A.ATTORNEY_ID = :V_ATTORNEY_ID
UNION
SELECT CAST(0 AS SMALLINT) AS ASSOCIATED,
CAST(:V_ATTORNEY_ID AS INTEGER) AS ATTORNEY_ID,
S.STATE_CODE,
S.NAME AS STATE_NAME,
CAST(NULL AS TIMESTAMP) AS CREATE_DATE,
CAST(NULL AS SMALLINT) AS CREATE_USER,
CAST(NULL AS TIMESTAMP) AS MODIFY_DATE,
CAST(NULL AS SMALLINT) AS MODIFY_USER,
CAST(NULL AS VARCHAR(10)) AS COURT_NO
FROM STATE S
WHERE NOT EXISTS (SELECT *
FROM ATTORNEY_STATE A2
WHERE A2.ATTORNEY_ID = :V_ATTORNEY_ID
AND A2.STATE_CODE = S.STATE_CODE)
INTO :R_ASSOCIATED, :R_ATTORNEY_ID, :R_STATE_CODE, :R_STATE_NAME, 
:R_CREATE_DATE, :R_CREATE_USER, :R_MODIFY_DATE, :R_MODIFY_USER, 
:R_COURT_NO DO
BEGIN
SUSPEND;
END
end
^^
SET TERM ; ^^

regardless of whether you have performance problems or not. Firebird 
have greatly improved since version 0.9.4 and NOT IN may or may not be 
slow with 2.5, but it is so simple to replace IN with EXISTS, and 
IN(subselect) is never quicker than EXISTS (it can be equally quick), 
so I see no reason for ever using IN (subselect).

Unfortunately, I have no answer to whether or not this bug have given 
you incorrect results on older Firebird versions or whether or not you 
ought to modify your old code.

By the way, in your particular case, I think I'd consider changing the 
procedure a bit more, but that eliminates the subselect and hence, your 
original question:

SET TERM ^^ ;
CREATE PROCEDURE SPS_ATTORNEY_STATE (
V_ATTORNEY_ID Integer)
returns (
R_ASSOCIATED SmallInt,
R_ATTORNEY_ID Integer,
R_STATE_CODE Char(2),
R_STATE_NAME VarChar(35),
R_CREATE_DATE TimeStamp,
R_CREATE_USER SmallInt,
R_MODIFY_DATE TimeStamp,
R_MODIFY_USER SmallInt,
R_COURT_NO VarChar(10))
AS
/*
Author : Michael Tuttle
Date : 10/02/2006
Purpose :
*/
begin
FOR SELECT CAST(IIF(A.STATE_CODE IS NULL, 0, 1) AS SMALLINT),
:V_ATTORNEY_ID,
S.STATE_CODE,
S.NAME,

RE: [firebird-support] Upgrade Firebird 1.5.3 to 2.5.4 - Existence Predicates NOT IN Question

2015-07-24 Thread 'stwizard' stwiz...@att.net [firebird-support]
Mark, thanks for the clarification on this.  Makes sense now.  Appreciate all 
the help.

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Friday, July 24, 2015 9:40 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Upgrade Firebird 1.5.3 to 2.5.4 - Existence 
Predicates NOT IN Question

 

  

On 24-7-2015 13:25, 'stwizard' stwiz...@att.net [firebird-support] wrote:
 Greetings All,

 In the Firebird 2 Migration  Installation guide
 http://www.firebirdsql.org/file/documentation/release_notes/Firebird-2_1_6-Installation.pdf
 on page 8 under the performance section it states the following:

 The following changes should be noted as possible sources of performance
 loss:

 Existence Predicates NOT IN and ALL May Be Slow

 Firebird and, before that, InterBase, have produced incorrect results
 for the logical existence predicates ALL and NOT IN for many years. That
 problem has been corrected in Firebird2.0, but the change means
 thatindexes on the inner tables cannot be used and performance may be
 slow compared to the same query's performance in V.1.5. “Inner tables”
 are the tables used in the subquery argument inside an ALL or NOT IN
 expression.

 So my questions:

 This only applies when there is a JOIN in the SQL statement correct?

No, everywhere you use NOT IN or ALL this applies. The documentation is 
talking about the inner table materialized by the select inside NOT IN 
(select ...). That condition can be replaced with an NOT EXISTS which - 
usually - performs better.

Mark
-- 
Mark Rotteveel





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



[firebird-support] FreeUDFLib 64 Bit version

2015-07-24 Thread 'stwizard' stwiz...@att.net [firebird-support]
Greetings,

 

Does anyone know where I can get a 64 bit version of the FreeUDFLib.dll?

 

I know Jeff Overcash (TeamB) has done it per this link, but I have no idea how 
to get ahold of him

http://codeverge.com/embarcadero.interbase.general/freeudflib-and-developing-udfs/1083840

 

Thanks,

Mike

 

 

 



RE: [firebird-support] Migration Guide for Firebird 1.5.3 to 2.5.4

2015-07-23 Thread 'stwizard' stwiz...@att.net [firebird-support]
Hi Marianne and thank you for your reply,

I found the link to IBSuregeon yesterday and reviewed it, I’m already on
dialect 3 and although FBClone sounds intriguing, it also scares me if
someone like Helen does not recommend it.

Mike

 

From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] 
Sent: Thursday, July 23, 2015 1:14 AM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] Migration Guide for Firebird 1.5.3 to 2.5.4

 

  

Hello Mike, 

 

I remember that i read this : 

http://www.firebirdsql.org/file/community/ppts/fbcon11/Firebird_Migration_75
Gb_IBSurgeon.pdf

and this was also interesting if you have to change from dialect 1 to 3 :
http://www.ic.unicamp.br/~celio/livrobd/firebird/GetStart.pdf at page 37
(the interbase 6 getstart.pdf documentation).

 

You can also have a look at https://code.google.com/p/fbclone/ which is an
interesting tool to migrate from firebird 1.5 to 2.5. 

 

Have a good day !

Marianne

 

 

De : firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] 
Envoyé : mercredi 22 juillet 2015 13:43
À : firebird-support@yahoogroups.com
Objet : [firebird-support] Migration Guide for Firebird 1.5.3 to 2.5.4

 

  

Greetings All,

 

I’m needing to get underway way with preparing my Firebird 1.5.3 database
for migration to 2.5.4.

 

Is there any documentation available that discusses what all needs to be
looked at before backing up the database in 1.5.3 and restoring to 2.5.4?

 

Possibly a migration guide?

 

Thanks,

Mike

 

 

 





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



RE: [firebird-support] Migration Guide for Firebird 1.5.3 to 2.5.4

2015-07-23 Thread 'stwizard' stwiz...@att.net [firebird-support]
Thank you Helen for your reply,

I'll do as you suggest and read the release notes (in order) and I may have
question after reading them.

Should I continue to ask all my questions in this thread or should I ask
each in a separate post?

For Instance, I do have a few questions currently:

1) The Character Set of my current database is NONE.  Is this OK or should I
set it to something else?  Or it this done automatically during the restore?

2) The database I want to upgrade is 25,231,544 KB, so I have a question.
Is it possible to do a metadata only backup followed by a restore of the
metadata only in 2.5.4 to see if there are any issues with Stored procedure,
Triggers, constraints,  keywords, etc  before attempting the full backup and
restore?

Thanks,
Mike

-Original Message-
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] 
Sent: Thursday, July 23, 2015 2:56 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Migration Guide for Firebird 1.5.3 to 2.5.4

At 11:42 p.m. 22/07/2015, 'stwizard' stwiz...@att.net [firebird-support]
wrote:


Greetings All,
 
Im needing to get underway way with preparing my Firebird 1.5.3 database
for migration to 2.5.4.

Firebird 1.5.3 to 2.5.4 is not a migration, it is an upgrade.  Actually, you
don't even *absolutely need* to upgrade your databases to run them under
2.5.4.  But if you have old application code, you are likely to bump into a
few problems if deprecation warnings have been ignored in the past.  Our
guys have spent the past 15 years cleaning horse manure out of the Firebird
engine.  And, of course, a, ODS 10.1 database can't take advantage of many
of the newer features that came for ODS 11.0, 11.1 and 11.2.


Is there any documentation available that discusses what all needs to be
looked at before backing up the database in 1.5.3 and restoring to 2.5.4?

Yes - the release notes for versions 2.0, 2.1 and 2.5, all read in order.
Check the compatibility sections of them all.  You will find that particular
documentation for v.2.0 and 2.1 in the same, separate document (Migration
and Installation Notes).  You'll find all of them at
http://www.firebirdsql.org/en/release-notes/

 
Possibly a migration guide?

You don't need a migration guide, per se, because it isn't a migration.
But I did call it that for the jump from 1.5 to 2.0 and particularly to 2.1,
because the metadata character set changed from ascii to unicode_fss.  Make
sure you read up on that particular thing, otherwise it will bite you.  But
- tip - if you do a careful reading of the release notes, you will discover
that gbak restore has a switch so that your restored database will have the
metadata charset updated for you.  If you have check constraints that
involve characters, you'll need both switches.

Do I need to advise you to make plenty of backups as you go?  Most likely
they'll end up being redundant but then there is Murphy's Law.

Helen







++

Visit http://www.firebirdsql.org and click the Documentation item on the
main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at
http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links





[firebird-support] Migration Guide for Firebird 1.5.3 to 2.5.4

2015-07-22 Thread 'stwizard' stwiz...@att.net [firebird-support]
Greetings All,

 

I'm needing to get underway way with preparing my Firebird 1.5.3 database
for migration to 2.5.4.

 

Is there any documentation available that discusses what all needs to be
looked at before backing up the database in 1.5.3 and restoring to 2.5.4?

 

Possibly a migration guide?

 

Thanks,

Mike

 

 

 



RE: [firebird-support] Firebird 1.5.3 on Windows 2012 R2 Server

2015-07-20 Thread 'stwizard' stwiz...@att.net [firebird-support]
I have not heard back from anyone on this and the office is asking me to 
provide an answer on this.  So please, can someone that has experience with 
this or know for sure, let me know?

 

Thanks,

Mike

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Thursday, July 16, 2015 12:15 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Firebird 1.5.3 on Windows 2012 R2 Server

Guys,

My email client blew up and I lost all of my inbox (outlook express) on windows 
XP back on Jun 30th.  I just got my new computer (Windows 7) setup using MS 
Outlook for my email client.  I had this email up ready to reply (on the old 
computer) when this happened, so I copied this off my old computer to send the 
reply now.  So I ask for patience on this…

So are you saying it will work but run the windows server out of memory, in 
other words  v1.5 works fine on Windows 2003 Server but will eat memory on 
Windows 2012 R2 Server?  Or did v1.5 also eat memory on Windows 2003 Server?

Anyway, I need to give our office an answer if it is OK to go ahead and setup a 
new Windows 2012 R2 server, so any others that can chime in would be 
appreciated.

 Thanks again,

Mike

 

- Original Message - 

From: 'liviusliv...@poczta.onet.pl' liviusliv...@poczta.onet.pl 
[firebird-support] 
mailto:'liviusliv...@poczta.onet.pl'%20liviusliv...@poczta.onet.pl%20[firebird-support]
  

To: firebird-support@yahoogroups.com 

Sent: Tuesday, June 30, 2015 11:12 AM

Subject: Odp: [firebird-support] Firebird 1.5.3 on Windows 2012 R2 Server

Hi,

I know only one - cache problem 
Windows can eat too many RAM.
Fixed in FB2.5 serie.

Migration to 2.5 does not require 2.1 between. Buf you can get migration errors 
like ambigous field names and other

Regards,
Karol Bieniaszewski

- Reply message -
Od: apos;Softtech Supportapos; stwiz...@att.net [firebird-support] 
firebird-support@yahoogroups.com
Do: firebird-support@yahoogroups.com
Temat: [firebird-support] Firebird 1.5.3 on Windows 2012 R2 Server
Data: wt., cze 30, 2015 16:12

Greetings All,

 

Can anyone tell me if Firebird 1.5.3 will run on Windows 2012 R2 Server?

 

Our Delphi application has run since 1997 on one version or another of windows 
server.  It is currently on Windows 2003 Server and we have had no issues at 
all.  Our office is wanting to install a new server with Windows 2012 R2 and I 
need to know if there are any issues I should be aware of or if Firebird will 
install and run without any issues.  

 

Is there a place to go on the web that discusses this in depth (If necessary)?

 

Thanks for anyone that takes there time to answer.

 

If I'm ever given any breathing room, I would eventually like to move to 
Firebird 2.5.4 and would also like to know if I should move in stages like to 
2.1 then to 2.5, etc.  Any documentaion on that would be helpful as well.

 

Thanks all,

 

Mike

 

 





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



Re: [firebird-support] Firebird 1.5.3 on Windows 2012 R2 Server

2015-07-16 Thread 'stwizard' stwiz...@att.net [firebird-support]
Guys,

 

My email client blew up and I lost all of my inbox (outlook express) on windows 
XP back on Jun 30th.  I just got my new computer (Windows 7) setup using MS 
Outlook for my email client.  I had this email up ready to reply (on the old 
computer) when this happened, so I copied this off my old computer to send the 
reply now.  So I ask for patience on this…

 

 

 

So are you saying it will work but run the windows server out of memory, in 
other words  v1.5 works fine on Windows 2003 Server but will eat memory on 
Windows 2012 R2 Server?  Or did v1.5 also eat memory on Windows 2003 Server?

 

Anyway, I need to give our office an answer if it is OK to go ahead and setup a 
new Windows 2012 R2 server, so any others that can chime in would be 
appreciated.

 

Thanks again,

Mike

 

 

- Original Message - 

From: 'liviusliv...@poczta.onet.pl' liviusliv...@poczta.onet.pl 
[firebird-support] 
mailto:'liviusliv...@poczta.onet.pl'%20liviusliv...@poczta.onet.pl%20[firebird-support]
  

To: firebird-support@yahoogroups.com 

Sent: Tuesday, June 30, 2015 11:12 AM

Subject: Odp: [firebird-support] Firebird 1.5.3 on Windows 2012 R2 Server

Hi,

I know only one - cache problem 
Windows can eat too many RAM.
Fixed in FB2.5 serie.

Migration to 2.5 does not require 2.1 between. Buf you can get migration errors 
like ambigous field names and other

Regards,
Karol Bieniaszewski

- Reply message -
Od: apos;Softtech Supportapos; stwiz...@att.net [firebird-support] 
firebird-support@yahoogroups.com
Do: firebird-support@yahoogroups.com
Temat: [firebird-support] Firebird 1.5.3 on Windows 2012 R2 Server
Data: wt., cze 30, 2015 16:12

Greetings All,

 

Can anyone tell me if Firebird 1.5.3 will run on Windows 2012 R2 Server?

 

Our Delphi application has run since 1997 on one version or another of windows 
server.  It is currently on Windows 2003 Server and we have had no issues at 
all.  Our office is wanting to install a new server with Windows 2012 R2 and I 
need to know if there are any issues I should be aware of or if Firebird will 
install and run without any issues.  

 

Is there a place to go on the web that discusses this in depth (If necessary)?

 

Thanks for anyone that takes there time to answer.

 

If I'm ever given any breathing room, I would eventually like to move to 
Firebird 2.5.4 and would also like to know if I should move in stages like to 
2.1 then to 2.5, etc.  Any documentaion on that would be helpful as well.

 

Thanks all,

 

Mike