Subject firebird-support-unsubscribe@yahoogroups.com
Author Stefan Renzewitz
-----Ursprüngliche Nachricht-----
Von: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com]
Gesendet: Freitag, 23. September 2005 15:04
An: firebird-support@yahoogroups.com
Betreff: [firebird-support] Digest Number 3547



There are 25 messages in this issue.

Topics in this digest:

1. Re: select birthdays from the next several days
From: Christian Brümmer <christian@...>
2. Re: select birthdays form the next several days
From: Alexandre Benson Smith <iblist@...>
3. Re: select birthdays form the next several days
From: Alexandre Benson Smith <iblist@...>
4. Re: select birthdays form the next several days
From: Ali Gökçen <alig@...>
5. Re: select birthdays form the next several days
From: Ali Gökçen <alig@...>
6. Re: select birthdays from the next several days
From: Christian Brümmer <christian@...>
7. Re: select birthdays form the next several days
From: Pavel Menshchikov <developer@...>
8. Re: select birthdays from the next several days
From: "Arno Brinkman" <firebird@...>
9. Re: select birthdays from the next several days
From: "davidalbiston" <mail@...>
10. Re: select birthdays form the next several days
From: Christian Brümmer <christian@...>
11. Re: select birthdays from the next several days
From: John vd Waeter <john@...>
12. Re: user limit
From: David Johnson <johnson_d@...>
13. Re: select birthdays form the next several days
From: Ali Gökçen <alig@...>
14. Re: Interbase/Firebird with a SAN
From: Steve Wiser <steve@...>
15. Re: Re: select birthdays form the next several days
From: "Arno Brinkman" <firebird@...>
16. Re[2]: select birthdays form the next several days
From: Pavel Menshchikov <developer@...>
17. Re: select birthdays from the next several days
From: Christian Brümmer <christian@...>
18. TSQLConnection x Firebird 1.5
From: "Leandro" <leandrorst@...>
19. Re: select birthdays form the next several days
From: "Ian A. Newby" <ian@...>
20. Re: TSQLConnection x Firebird 1.5
From: "Martijn Tonies" <m.tonies@...>
21. Re: TSQLConnection x Firebird 1.5
From: "Miroslav Penchev" <miroslavp@...>
22. Re: select birthdays from the next several days
From: "Arno Brinkman" <firebird@...>
23. Re: New member, need help with data 'padding?'
From: Pavel Menshchikov <developer@...>
24. RE: Re: select birthdays form the next several days
From: "Cao Ancoinc" <fossetts@...>
25. 2 clients' IB_Event RegisterEvents to Firebird 1.5 cause database hung!
From: "Kadee" <bigred17201720@...>


________________________________________________________________________
________________________________________________________________________

Message: 1
Date: Fri, 23 Sep 2005 11:02:15 +0200
From: Christian Brümmer <christian@...>
Subject: Re: select birthdays from the next several days

Hi Magnus,

Magnus Titho wrote:

> select Birthday
> from Persons
> where cast('2000-' || extract(month from Birthday) || '-' || extract(day
> from Birthday) as date) between [...]

This is close to my idea 2, but as a single SQL. Thank you very much,
this is exactly, what I was looking for.

In general I should play around more with the CAST function.

Hi Simon,

Simon Carter wrote,

> (http://www.fbtalk.net/viewtopic.php?id=189)

thanks for your link, but even the datediff is not, what I was looking
for. But in general this is a good link to other sources.

Thanks again to both of you for your fast reply.

Christian


________________________________________________________________________
________________________________________________________________________

Message: 2
Date: Fri, 23 Sep 2005 06:14:14 -0300
From: Alexandre Benson Smith <iblist@...>
Subject: Re: select birthdays form the next several days

Christian Brümmer wrote:

>Hi Firebird group,
>
>I have a table with the name as varchar and the birthday as date.
>
>And now a simple question: how can a get with a simple SQL statement the
>name of the people, who will have birthday within the next 14 (for
>example) days. Is it possible to do this in a single SQL statement?
>
>The question is easy, but the solution not, correct?
>
>I have two ideas:
>
>1st idea: in my application, I will calculate the days and split it into
>months and days. In the SQL statement, I will filter the information
>with WHERE to check the months and days.
>
>2nd idea: I make a second column: birthday_calc, which has a fixed year
>(2000) instead of the original birth year. So I can get the data, with a
>simple: where birthday_calc >= '2000-09-10' and birthday_calc <=
>'2000-09-24'
>
>I don't like them both, do you have another better idea?
>
>Thanks in advance
>
>Christian
>
>
>
>
Christian,

What about the following statement...

select
Name, BirthDate
from
Table
where
Cast('2000-' || extract(month from BirthDate) || '-' || extract(day
from BirthDate) as Date) between
Cast('2000-' || extract(month from Current_TimeStamp) || '-' ||
extract(day from Current_TimeStamp) as Date) and
Cast('2000-' || extract(month from Current_TimeStamp) || '-' ||
extract(day from Current_TimeStamp) as Date) + 14
order by
extract(month from BirthDate), extract(day from BirthDate)

No index will be used in a such query

see you !

--

Alexandre Benson Smith
Development
THOR Software e Comercial Ltda.
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.5/110 - Release Date: 22/09/2005



________________________________________________________________________
________________________________________________________________________

Message: 3
Date: Fri, 23 Sep 2005 06:18:12 -0300
From: Alexandre Benson Smith <iblist@...>
Subject: Re: select birthdays form the next several days

oops...

Exactly as Magnus suggested...

Sorry didn't see the answer before I had send my message.

see you !

--

Alexandre Benson Smith
Development
THOR Software e Comercial Ltda.
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.5/110 - Release Date: 22/09/2005



________________________________________________________________________
________________________________________________________________________

Message: 4
Date: Fri, 23 Sep 2005 09:20:50 -0000
From: Ali Gökçen <alig@...>
Subject: Re: select birthdays form the next several days

Hi,
with index(on birthdate) using:

select name,bdate from person
where
bdate between
cast( extract(day from current_date)||'.'||extract(month from
current_date) ||'.'||extract(year from bdate) as date)
and
cast( extract(day from current_date)||'.'||extract(month from
current_date) ||'.'||extract(year from bdate) as date) + 14


-Ali

--- In firebird-support@yahoogroups.com, Christian Brümmer
<christian@b...> wrote:
> Hi Firebird group,
>
> I have a table with the name as varchar and the birthday as date.
>
> And now a simple question: how can a get with a simple SQL
statement the
> name of the people, who will have birthday within the next 14 (for
> example) days. Is it possible to do this in a single SQL statement?
>
> The question is easy, but the solution not, correct?
>
> I have two ideas:
>
> 1st idea: in my application, I will calculate the days and split
it into
> months and days. In the SQL statement, I will filter the
information
> with WHERE to check the months and days.
>
> 2nd idea: I make a second column: birthday_calc, which has a fixed
year
> (2000) instead of the original birth year. So I can get the data,
with a
> simple: where birthday_calc >= '2000-09-10' and birthday_calc <=
> '2000-09-24'
>
> I don't like them both, do you have another better idea?
>
> Thanks in advance
>
> Christian




________________________________________________________________________
________________________________________________________________________

Message: 5
Date: Fri, 23 Sep 2005 09:41:00 -0000
From: Ali Gökçen <alig@...>
Subject: Re: select birthdays form the next several days

Pardon,
there is leap year problem possibility in my query..
my insufficient think and answer. ;)

You should add 'CASE' command to correct calculation of date if
your index using is must.
( Lets hope FB doesn't full scan rows for calculations )

-Ali

--- In firebird-support@yahoogroups.com, Ali Gökçen <alig@e...>
wrote:
> Hi,
> with index(on birthdate) using:
>
> select name,bdate from person
> where
> bdate between
> cast( extract(day from current_date)||'.'||extract(month from
> current_date) ||'.'||extract(year from bdate) as date)
> and
> cast( extract(day from current_date)||'.'||extract(month from
> current_date) ||'.'||extract(year from bdate) as date) + 14
>
>
> -Ali
>
> --- In firebird-support@yahoogroups.com, Christian Brümmer
> <christian@b...> wrote:
> > Hi Firebird group,
> >
> > I have a table with the name as varchar and the birthday as date.
> >
> > And now a simple question: how can a get with a simple SQL
> statement the
> > name of the people, who will have birthday within the next 14
(for
> > example) days. Is it possible to do this in a single SQL
statement?
> >
> > The question is easy, but the solution not, correct?
> >
> > I have two ideas:
> >
> > 1st idea: in my application, I will calculate the days and split
> it into
> > months and days. In the SQL statement, I will filter the
> information
> > with WHERE to check the months and days.
> >
> > 2nd idea: I make a second column: birthday_calc, which has a
fixed
> year
> > (2000) instead of the original birth year. So I can get the
data,
> with a
> > simple: where birthday_calc >= '2000-09-10' and birthday_calc <=
> > '2000-09-24'
> >
> > I don't like them both, do you have another better idea?
> >
> > Thanks in advance
> >
> > Christian




________________________________________________________________________
________________________________________________________________________

Message: 6
Date: Fri, 23 Sep 2005 12:18:50 +0200
From: Christian Brümmer <christian@...>
Subject: Re: select birthdays from the next several days

Hi all,

thanks for all your answers:

>>select Birthday
>>from Persons
>>where cast('2000-' || extract(month from Birthday) || '-' || extract(day
>>from Birthday) as date) between [...]

I'm sorry to say, that this will fail during the end of the year.

Any other ideas or improvements?

Best regards

Christian


________________________________________________________________________
________________________________________________________________________

Message: 7
Date: Fri, 23 Sep 2005 16:33:03 +0600
From: Pavel Menshchikov <developer@...>
Subject: Re: select birthdays form the next several days

Hello Christian,

CB> I have a table with the name as varchar and the birthday as date.

CB> And now a simple question: how can a get with a simple SQL statement the
CB> name of the people, who will have birthday within the next 14 (for
CB> example) days. Is it possible to do this in a single SQL statement?

CB> The question is easy, but the solution not, correct?

Have you tried
-----
select Name, BirthDate from Persons
where BirthDate between :Dt and :Dt + 14;
-----

--
Best regards,
Pavel Menshchikov
http://www.ls-software.com/



________________________________________________________________________
________________________________________________________________________

Message: 8
Date: Fri, 23 Sep 2005 13:12:24 +0200
From: "Arno Brinkman" <firebird@...>
Subject: Re: select birthdays from the next several days

Hi,

> Any other ideas or improvements?

Check on ((Month * 100) + Day)

SELECT
PersonName,
Birthday
FROM
Persons
WHERE
(EXTRACT(MONTH FROM Birthday) * 100) +
EXTRACT(DAY FROM Birthday) BETWEEN
(EXTRACT(MONTH FROM CURRENT_DATE) * 100) +
EXTRACT(DAY FROM CURRENT_DATE) and
(EXTRACT(MONTH FROM CURRENT_DATE + 14) * 100) +
EXTRACT(DAY FROM CURRENT_DATE + 14)

You can replace the two between checks by parameters.

Also note (already noticed by someone else) that no indexes can be used here. If you really need to
use an index then create a shadow column that is updated by triggers.

Regards,
Arno Brinkman
ABVisie

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
General database developer support:
http://www.databasedevelopmentforum.com

Firebird open source database (based on IB-OE) with many SQL-99 features:
http://www.firebirdsql.org
http://www.firebirdsql.info

Support list for Interbase and Firebird users:
firebird-support@yahoogroups.com

Nederlandse firebird nieuwsgroep:
news://newsgroups.firebirdsql.info



________________________________________________________________________
________________________________________________________________________

Message: 9
Date: Fri, 23 Sep 2005 11:14:25 -0000
From: "davidalbiston" <mail@...>
Subject: Re: select birthdays from the next several days

I was thinking along the lines of

where cast(Extract(Year from current_date) ||'-'|| Extract(Month from
DoB) ||'-'|| Extract(Day from DoB) as date)
between current_date and current_date + 13

This fails if the birthday is 29th February and the current year is
not a leap year. To handle those, I think you cannot avoid a stored
procedure.

Dave

--- In firebird-support@yahoogroups.com, Christian Brümmer
<christian@b...> wrote:
> Hi all,
>
> thanks for all your answers:
>
> >>select Birthday
> >>from Persons
> >>where cast('2000-' || extract(month from Birthday) || '-' ||
extract(day
> >>from Birthday) as date) between [...]
>
> I'm sorry to say, that this will fail during the end of the year.
>
> Any other ideas or improvements?
>
> Best regards
>
> Christian





________________________________________________________________________
________________________________________________________________________

Message: 10
Date: Fri, 23 Sep 2005 13:31:58 +0200
From: Christian Brümmer <christian@...>
Subject: Re: select birthdays form the next several days

Hi Pavel,

> Have you tried
> -----
> select Name, BirthDate from Persons
> where BirthDate between :Dt and :Dt + 14;

This cannot work, as most of the people don't have birthday in the same
year. I can use this with my second idea (with a second column with a
fixed year) but not on the original dates.

But thanks for your input!

Christian






________________________________________________________________________
________________________________________________________________________

Message: 11
Date: Fri, 23 Sep 2005 13:44:02 +0200
From: John vd Waeter <john@...>
Subject: Re: select birthdays from the next several days

> Also note (already noticed by someone else) that no indexes can be used
> here. If you really need to
> use an index then create a shadow column that is updated by triggers.

And if you create a shadowcolumn, just fill it with 'mmdd'.
Makes live easier...

:-)

John


________________________________________________________________________
________________________________________________________________________

Message: 12
Date: Fri, 23 Sep 2005 06:45:33 -0500
From: David Johnson <johnson_d@...>
Subject: Re: user limit

I believe that Firebird has a hard limit of 1024 user connections per
server.

I currently run a major system on another DBMS with 8000 concurrent
users. The DBMS only supports 500 concurrent users. A good connection
sharing mechanism is a must if you want to do something like this.

On Fri, 2005-09-23 at 07:07 +0000, mirom_2005 wrote:
> Hi group,
>
> I was asked to the limitation of max concurrent users
> and how it can be looking an infrastructure for a c/s application
> (delphi / firebird) with up to 500 users?
>
> At the moment the application looks like this: 1 to 20 clients connect
> two databases (one for user data, one for reference data) on one
> database server.
>
> I would be grateful if anyone could give me a tip
> mirom
>
>
>
>
>
>
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://firebird.sourceforge.net 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
>
>
>
>
>
>
>



________________________________________________________________________
________________________________________________________________________

Message: 13
Date: Fri, 23 Sep 2005 11:55:12 -0000
From: Ali Gökçen <alig@...>
Subject: Re: select birthdays form the next several days

my lunch is ok, here is my personal solution:

select name,bdate from person

where

bdate between

cast( extract(day from current_date) -
(case when extract(day from current_date)=29 and extract(month
from current_date)=2 then 28 else 0) ||
'.'||extract(month from current_date) +
(case when extract(day from current_date)=29 and extract(month
from current_date)=2 then 1 else 0)||
'.'||extract(year from bdate) as date)

AND -- if current date is elapsed then interpret the base date as 1
march

cast( extract(day from current_date) -
(case when extract(day from current_date)=29 and extract(month
from current_date)=2 then 28 else 0) ||
'.'||extract(month from current_date) +
(case when extract(day from current_date)=29 and extract(month
from current_date)=2 then 1 else 0)||
'.'||extract(year from bdate) as date)
+ case when extract(day from current_date)=29 and extract
(month from current_date)=2 then 13 else 14)
-- tolerate the date shifting


Theorically it should be do index scan.
I preffer CPU calculations instead of DISK I/O.

-Ali

--- In firebird-support@yahoogroups.com, Christian Brümmer
<christian@b...> wrote:
> Hi Firebird group,
>
> I have a table with the name as varchar and the birthday as date.
>
> And now a simple question: how can a get with a simple SQL
statement the
> name of the people, who will have birthday within the next 14 (for
> example) days. Is it possible to do this in a single SQL statement?
>
> The question is easy, but the solution not, correct?
>
> I have two ideas:
>
> 1st idea: in my application, I will calculate the days and split
it into
> months and days. In the SQL statement, I will filter the
information
> with WHERE to check the months and days.
>
> 2nd idea: I make a second column: birthday_calc, which has a fixed
year
> (2000) instead of the original birth year. So I can get the data,
with a
> simple: where birthday_calc >= '2000-09-10' and birthday_calc <=
> '2000-09-24'
>
> I don't like them both, do you have another better idea?
>
> Thanks in advance
>
> Christian





________________________________________________________________________
________________________________________________________________________

Message: 14
Date: Fri, 23 Sep 2005 08:08:35 -0400
From: Steve Wiser <steve@...>
Subject: Re: Interbase/Firebird with a SAN

Thanks. We are having a conference call with Dell today to get the
final pricing on the boxes. If it is reasonable then I think we are
going to do it. Hopefully there won't be too many surprises...

-steve

On Thu, 2005-09-22 at 22:08 -0300, Alexandre Benson Smith wrote:

> Steve Wiser wrote:
>
> >Hi All,
> >
> > Anyone here use a SAN to store the database files and have the
> server
> >connected to the SAN over Fibre channel? If so, how do you like it?
> >
> > We are trying to get a handle on our fast growing storage needs and
> >adding hard drives to individual servers (and their backup servers)
> is
> >starting to get out of control. I am assuming that
> Interbase/Firebird
> >will not have a problem with a SAN as I think the OS thinks that the
> >hard drive is local, but I am not 100% sure.
> >
> > We are thinking about starting off with a 3 TB SAN from Dell and
> >attaching it to 8 of our servers, but I would love to hear if anyone
> >else is doing this and if so how it is going, any pitfalls to avoid,
> >etc.
> >
> >Thanks,
> >Steve
> >
> >
> >
> Steve,
>
> No experience with it :-(
>
> But I think if you ensure that no other FB Engine access the same
> database file, you will be ok.
>
> see you !
>
> --
>
> Alexandre Benson Smith
> Development
> THOR Software e Comercial Ltda.
> Santo Andre - Sao Paulo - Brazil
> www.thorsoftware.com.br
>
>
>


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



________________________________________________________________________
________________________________________________________________________

Message: 15
Date: Fri, 23 Sep 2005 14:09:23 +0200
From: "Arno Brinkman" <firebird@...>
Subject: Re: Re: select birthdays form the next several days

Hi,

> bdate between
>
> cast( extract(day from current_date) -
> (case when extract(day from current_date)=29 and extract(month
> from current_date)=2 then 28 else 0) ||
> '.'||extract(month from current_date) +
> (case when extract(day from current_date)=29 and extract(month
> from current_date)=2 then 1 else 0)||
> '.'||extract(year from bdate) as date)
<snip>

> Theorically it should be do index scan.

No, because bdate is used at the left and right side in the comparisons.

Regards,
Arno Brinkman
ABVisie

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
General database developer support:
http://www.databasedevelopmentforum.com

Firebird open source database (based on IB-OE) with many SQL-99 features:
http://www.firebirdsql.org
http://www.firebirdsql.info

Support list for Interbase and Firebird users:
firebird-support@yahoogroups.com

Nederlandse firebird nieuwsgroep:
news://newsgroups.firebirdsql.info



________________________________________________________________________
________________________________________________________________________

Message: 16
Date: Fri, 23 Sep 2005 18:13:02 +0600
From: Pavel Menshchikov <developer@...>
Subject: Re[2]: select birthdays form the next several days

Hello Christian,

CB> This cannot work, as most of the people don't have birthday in the same
CB> year. I can use this with my second idea (with a second column with a
CB> fixed year) but not on the original dates.
:) Sorry, I need to sleep more :)

Then create another field with 'mmdd' as John suggested, [index
it,] and use trigger(s) to populate it. (it's my prefer :)



--
Best regards,
Pavel Menshchikov
http://www.ls-software.com/



________________________________________________________________________
________________________________________________________________________

Message: 17
Date: Fri, 23 Sep 2005 14:19:53 +0200
From: Christian Brümmer <christian@...>
Subject: Re: select birthdays from the next several days

Hi Arno,

Arno Brinkman wrote:

> Check on ((Month * 100) + Day)

That's an interesting idea.

I was skeptic, if it is working and I was true: this also has a problem,
when the year is changing:

currentday = 2005-12-22 = 1222
currentday + 14 = 2006-01-06 = 106

So it will list all the people, except the ones, which have birthday. ;-)

I think, I will work with a shadow column (mmdd), which is update by a
trigger and a stored procedure to get the data (because of the year change).

As I said: an easy question (and an easy problem), but not so easy to
develop (in a one-liner).

Thanks all for your input

Christian




________________________________________________________________________
________________________________________________________________________

Message: 18
Date: Fri, 23 Sep 2005 08:55:02 -0300
From: "Leandro" <leandrorst@...>
Subject: TSQLConnection x Firebird 1.5

I installed Firebird 1.5.
In Delphi 7, component TSQLConnection:
Property " Connection Name " = IBConnection
VendorLib " = gds32.dll

When I place the property " Connected " for True, the mistake appears:
" Error Unable to Load gds32.dll "

What has to do to tie component " TSQLConnection " to Firebird 1.5

----------

No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.5/110 - Release Date: 22/09/2005


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






________________________________________________________________________
________________________________________________________________________

Message: 19
Date: Fri, 23 Sep 2005 12:31:49 -0000
From: "Ian A. Newby" <ian@...>
Subject: Re: select birthdays form the next several days

How about

select birthday from persons
where mod((current_date - birthday) / 365.25) < (14 / 365)

you'll need a MOD udf though.

It may be a bit inaccurate, but should be nearly there.

regards
Ian Newby





________________________________________________________________________
________________________________________________________________________

Message: 20
Date: Fri, 23 Sep 2005 14:31:18 +0200
From: "Martijn Tonies" <m.tonies@...>
Subject: Re: TSQLConnection x Firebird 1.5



> I installed Firebird 1.5.
> In Delphi 7, component TSQLConnection:
> Property " Connection Name " = IBConnection
> VendorLib " = gds32.dll
>
> When I place the property " Connected " for True, the mistake appears:
> " Error Unable to Load gds32.dll "
>
> What has to do to tie component " TSQLConnection " to Firebird 1.5

Try setting VendorLib to "fbclient.dll"

With regards,

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com



________________________________________________________________________
________________________________________________________________________

Message: 21
Date: Fri, 23 Sep 2005 15:32:30 +0300
From: "Miroslav Penchev" <miroslavp@...>
Subject: Re: TSQLConnection x Firebird 1.5

On Fri, 23 Sep 2005 14:55:02 +0300, Leandro <leandrorst@...>
wrote:

> I installed Firebird 1.5.
> In Delphi 7, component TSQLConnection:
> Property " Connection Name " = IBConnection
> VendorLib " = gds32.dll
>
> When I place the property " Connected " for True, the mistake appears:
> " Error Unable to Load gds32.dll "
>
> What has to do to tie component " TSQLConnection " to Firebird 1.5
>

You should make client (at least) install of Firebird 1.5 on your
development PC.

Cheers,
--
Miroslav Penchev


________________________________________________________________________
________________________________________________________________________

Message: 22
Date: Fri, 23 Sep 2005 14:34:52 +0200
From: "Arno Brinkman" <firebird@...>
Subject: Re: select birthdays from the next several days

Hi,

>> Check on ((Month * 100) + Day)
>
> That's an interesting idea.
>
> I was skeptic, if it is working and I was true: this also has a problem,
> when the year is changing:
>
> currentday = 2005-12-22 = 1222
> currentday + 14 = 2006-01-06 = 106

:-/ You're correct that this doesn't work.

Note, that you must keep this in mind for the shadow column too :-)

Regards,
Arno Brinkman
ABVisie

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
General database developer support:
http://www.databasedevelopmentforum.com

Firebird open source database (based on IB-OE) with many SQL-99 features:
http://www.firebirdsql.org
http://www.firebirdsql.info

Support list for Interbase and Firebird users:
firebird-support@yahoogroups.com

Nederlandse firebird nieuwsgroep:
news://newsgroups.firebirdsql.info



________________________________________________________________________
________________________________________________________________________

Message: 23
Date: Fri, 23 Sep 2005 18:41:49 +0600
From: Pavel Menshchikov <developer@...>
Subject: Re: New member, need help with data 'padding?'

Hello John,

s> I am reading csv files to a table using firebirds built in
s> functionality. However when I query the fields I need the data returned
s> padded, for example if I query on a First_Name field I want the data
s> to be returned like "John " and trunicated if it exceedes the
s> field width.
What is a field First_Name definition (with which you get trimmed
value)? Use CHAR (not VARCHAR), set appropriate options in your data
access components (some may auto-trim CHAR fields by default), and
you'll get what you want without additional actions.

s> I was thinking that I could set this up as a trigger for when the data
s> is droped into the table, and am hoping that I do not have to code the
s> padding routines into the client programs as that would increase the
s> complexity of the project ENOURMOUSLY!
You don't need it at all.



--
Best regards,
Pavel Menshchikov
http://www.ls-software.com/



________________________________________________________________________
________________________________________________________________________

Message: 24
Date: Fri, 23 Sep 2005 15:11:25 +0200
From: "Cao Ancoinc" <fossetts@...>
Subject: RE: Re: select birthdays form the next several days

What about using the dob year

select dob from ordtrn
Where ((Current_Date+14) -
(Cast (Extract(Year from Current_Date)||'-'|| Extract (Month from
dob)||'-'|| Extract (Day from dob) as Date)))
between 1 and 14

Reagrds Cao

> -----Original Message-----
> From: firebird-support@yahoogroups.com
> [mailto:firebird-support@yahoogroups.com]On Behalf Of Ian A. Newby
> Sent: 23 September 2005 02:32
> To: firebird-support@yahoogroups.com
> Subject: [firebird-support] Re: select birthdays form the next several
> days
>
>
> How about
>
> select birthday from persons
> where mod((current_date - birthday) / 365.25) < (14 / 365)
>
> you'll need a MOD udf though.
>
> It may be a bit inaccurate, but should be nearly there.
>
> regards
> Ian Newby
>
>
>
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://firebird.sourceforge.net 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
>
>
>
>
>
>
>
>




________________________________________________________________________
________________________________________________________________________

Message: 25
Date: Fri, 23 Sep 2005 13:04:18 -0000
From: "Kadee" <bigred17201720@...>
Subject: 2 clients' IB_Event RegisterEvents to Firebird 1.5 cause database hung!

Hi Groups,

I have FB1.5 database,on a table after update addd
a trigger:

CREATE TRIGGER JMISUSER_AU0 FOR JMISUSER
ACTIVE AFTER UPDATE POSITION 0
AS
begin
post_event 'MSG';
end

I writed a application with Delphi7.0 and ibo4.3.Aa.
with a ib_event.events.add('MSG');

When just a application run,evething is fine,
the ib_event get the alert from database as I want.
but if I run this application from another pc at same time,
when application run into
IB_Event.RegisterEvents;
the database hunged,and both 2 clients cannot get any reply
from the server.
Even I cannot stop the database server engine in the server.
I must reboot the server to let DB become normal.

Can anyone give me a hint? Thanks advance.


Kadee






________________________________________________________________________
________________________________________________________________________


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://firebird.sourceforge.net 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




------------------------------------------------------------------------