Re: [firebird-support] Re: Firebird Indexing problem

2015-10-23 Thread Ann Harrison aharri...@ibphoenix.com [firebird-support]
On Fri, Oct 23, 2015 at 2:40 AM, drci...@yahoo.com [firebird-support] < firebird-support@yahoogroups.com> wrote: > > > I don't think I understand you fully. Indexed reads a hudreds of times > faster than non indexed. > Yes, when you're looking for a specific value. When you're looking for

RE: [firebird-support] Re: How to do a running total in SQL

2015-10-23 Thread Maya Opperman m...@omniaccounts.co.za [firebird-support]
Norbert wrote: >execute block >returns (reference varchar(10), due double precision, balance double >precision) >as >begin >balance = 0; >for select >reference,due >from invoices into :reference, :due >do begin >balance = balance+due; >suspend; >end >end Thank you Norbert, that does look like

Re: [firebird-support] Writing to Aliases.conf in non-admin mode

2015-10-23 Thread Eduardo guse...@gmail.com [firebird-support]
I did what (I think is what) you need many years ago. I don´t remember exactly the details, but this is still working. What I did was the following: When my application initiates, it checks if there exists a database named MYAPPLICATIONCONFIGURACION.FDB. If it doesn't exist, it creates it.

Re: [firebird-support] Writing to Aliases.conf in non-admin mode

2015-10-23 Thread Venus Software Operations venussof...@gmail.com [firebird-support]

Re: [firebird-support] Writing to Aliases.conf in non-admin mode

2015-10-23 Thread Venus Software Operations venussof...@gmail.com [firebird-support]

Re: [firebird-support] Writing to Aliases.conf in non-admin mode

2015-10-23 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
Bhavbhuti, > My application allows users to create a database and it's entry in > aliases.conf is created by the application. This essentially is > fine and works well in Admin mode, as soon as the same is tried to > be done using the normal non-admin mode I am not able to update aliases.conf >

Re: [firebird-support] Restore without constraints

2015-10-23 Thread Rik van Kekem r...@graficalc.nl [firebird-support]
Köditz, Martin martin.koed...@it-syn.de [firebird-support] wrote: > is it possible to restore a database without constraints? Or is there > another way to do this? I just want do delete each primary key in the db. Is this on a healthy DB? I'm not sure if -I disables the constraints in that case.

Re: [firebird-support] Re: Firebird Indexing problem

2015-10-23 Thread Svein Erling Tysvær setys...@gmail.com [firebird-support]
Hi, you're wrong. Non-indexed reads are faster than indexed reads. However, indexed reads may reduce the data that needs to be read and with the right conditions, it can speed up things tremendously. Let's say you have a table with breast cancer patients. Using an index for gender would slow

RE: [firebird-support] How to do a running total in SQL

2015-10-23 Thread Maya Opperman m...@omniaccounts.co.za [firebird-support]
>>In Firebird 3 it will be possible with window functions. In Firebird 2.5 I >>don't know a way in pure SQL. >>Mark Great, thanks Mark. Cool, so I’ll be doing something like this, when Firebird 3 is available: select emp_no, salary, sum(salary) over (order by salary) cum_salary, sum(salary)

[firebird-support] Re: Firebird Indexing problem

2015-10-23 Thread drci...@yahoo.com [firebird-support]
Hello Karol, I don't think I understand you fully. Indexed reads a hudreds of times faster than non indexed. And the table will have millions of records, so I do need them. "then this is cheaper to scan table (500 records) then use 400 indexed reads" What do you mean scan table? How do I do

[firebird-support] How to do a running total in SQL

2015-10-23 Thread Maya Opperman m...@omniaccounts.co.za [firebird-support]
Hi, I'd like to add a running total to my result set. For example: Table: Invoices Reference Due Invoice1 50.00 Invoice2 30.00 Invoice3 20.00 I'm guessing SQL would be something like: Select Reference, Due, Sum_Total(Due) as Balance >From

Re: [firebird-support] How to do a running total in SQL

2015-10-23 Thread Svein Erling Tysvær setys...@gmail.com [firebird-support]
This will become simpler with Firebird 3, which implements windowing functions. Simple cases can also be possible with older versions and some imagination, e.g. with tmp (Reference, SumDue) as (Select Reference, Sum(Due) From Invoices Group by 1) Select Reference, SumDue, (select sum(SumDue)

[firebird-support] Re: How to do a running total in SQL

2015-10-23 Thread Norbert Saint Georges n...@tetrasys.eu [firebird-support]
Hi, execute block returns (reference varchar(10), due double precision, balance double precision) as begin balance = 0; for select reference,due from invoices into :reference, :due do begin balance = balance+due; suspend; end end Norbert

RE: [firebird-support] Restore without constraints

2015-10-23 Thread Köditz, Martin martin.koed...@it-syn.de [firebird-support]
I've done that. But the keys still exist and I'm not able to delete them while there are many dependencies. Maybe the only chance is to delete the foreign keys first and then the primary keys. Or is there a more graceful way? Regards Martin

Re: [firebird-support] How to do a running total in SQL

2015-10-23 Thread 'Mark Rotteveel' m...@lawinegevaar.nl [firebird-support]
In Firebird 3 it will be possible with window functions. In Firebird 2.5 I don't know a way in pure SQL. Mark - Reply message - Van: "Maya Opperman m...@omniaccounts.co.za [firebird-support]" Aan: "firebird-support@yahoogroups.com"