Re: [firebird-support] SQL Error 303

2020-05-27 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
27.05.2020 13:29, 'Olaf Kluge' olaf.kl...@satron.de [firebird-support] wrote: > what function can I take instead of the isc_expand_dpb? There is no replacement for this function. You must use the same allocation function that was used for original DPB which depends on the host language. --

Re: [firebird-support] SQL Error 303

2020-05-27 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
The Firebird-support mailing list has moved from Yahoo Groups to Google Groups, https://groups.google.com/d/forum/firebird-support (or subscribe by emailing to firebird-support+subscr...@googlegroups.com and confirm by replying to the confirmation request). Could you please subscribe to the lis

Re: [firebird-support] SQL Error 303

2020-05-27 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
27.05.2020 12:51, 'Check_Mail' check_m...@satron.de [firebird-support] wrote: > The name of the function is /*isc_expand_dpb*/ This function is deprecated since Firebird 1.0. -- WBR, SD. +

Re: [firebird-support] SQL slower after N executions?

2020-05-01 Thread Kjell Rilbe kjell.ri...@marknadsinformation.se [firebird-support]
OK, so the last change was successful: The +0 as suggested by Set works. The query now uses the faster query plan through the entire batch (at least it still does after 1769 chunks. Many thanks for all your input! I still think it would be interesting with some theories about why the engine beh

Re: [firebird-support] SQL slower after N executions?

2020-04-29 Thread Svein Erling Tysvær setys...@gmail.com [firebird-support]
I don't know why things slow down, Kjell, if the batch job updates records, I guess it could be related to there being lots of versions of some records and that garbage are only collected after your application ends (it sounds plausible if transactions are still open when you "Stopping the batch an

RE: [firebird-support] SQL

2019-08-30 Thread mohamed hamza medh...@hotmail.com [firebird-support]
août 2019 05:27 À : firebird-support@yahoogroups.com Objet : Re: [firebird-support] SQL On 8/5/19 4:20 AM, mohamed hamza medh...@hotmail.com [firebird-support] wrote: > > > Hi All, > > I am new to sql, I am coming from Xbase system . > I want to know if it 's pos

Re: [firebird-support] SQL

2019-08-28 Thread Ann Harrison aharri...@ibphoenix.com [firebird-support]
> On Aug 28, 2019, at 12:54 AM, Kjell Rilbe kjell.ri...@marknadsinformation..se > [firebird-support] wrote: > > Den 2019-08-05 kl. 13:20, skrev mohamed hamza medh...@hotmail.com > [firebird-support]: >> >> Hi All, >> >> I am new to sql, I am coming from Xbase system . >> I want to kn

Re: [firebird-support] SQL

2019-08-27 Thread Richard Damon rich...@damon-family.org [firebird-support]
On 8/5/19 4:20 AM, mohamed hamza medh...@hotmail.com [firebird-support] wrote: >   > > Hi All, > >   I am new to sql,  I am coming  from  Xbase  system . >  I want to know if it 's  possible to execute query using last query > result? > > EXAMPLE >    > 1  select * from persons where state='CA' > >

Re: [firebird-support] SQL

2019-08-27 Thread Kjell Rilbe kjell.ri...@marknadsinformation.se [firebird-support]
Den 2019-08-05 kl. 13:20, skrev mohamed hamza medh...@hotmail.com [firebird-support]: > > Hi All, > >   I am new to sql,  I am coming  from  Xbase  system . >  I want to know if it 's  possible to execute query using last query > result? > > EXAMPLE > 1  select * from persons where state='CA' > >

Re: [firebird-support] SQL output required in vertical format

2017-07-04 Thread Vishal Tiwari vishuals...@yahoo.co.in [firebird-support]
Hi SET, I was Just working on one training Session and remembered you. Just sharing the SQL I prepared. Kindly give your Sign off on it. :) CREATE TABLE SALES_DETAILS(  DTDATE Date NOT NULL,  SALES_PERSON_CODE Varchar(15) NOT NULL,  BRANCH_CODE Varchar(15),  PRIMARY KEY (DTDATE,SALE_PERSON_CODE)

RE: [firebird-support] SQL performance SS FB 3.0.1 vs SC FB 2.5.2

2016-08-09 Thread 'Leyne, Sean' s...@broadviewsoftware.com [firebird-support]
> Just found that on a particular case, SS FB 3.0.1 is about 4x slower than SC > FB > 2.5.2. > > Here is the query : > == > select a.id,b.nm from tbl1 a, tbl2 b > where a.id = b.id > and a.id in (select c.id from tbl3 c) > > If the query change to this : > =

Re: [firebird-support] SQL standard for sort fields and returned fields

2016-05-09 Thread 'Mark Rotteveel' m...@lawinegevaar.nl [firebird-support]
Could you please stop with your replies that contribute absolutely nothing to the discussion. Mark - Bericht beantwoorden - Van: "kristinwens...@yahoo.com [firebird-support]" Aan: "firebird-support@yahoogroups.com" Onderwerp: [firebird-support] SQL standard for sort fields and returned

Re: [firebird-support] SQL standard for sort fields and returned fields

2016-05-09 Thread kristinwens...@yahoo.com [firebird-support]
Perfect On Monday, May 9, 2016 8:48 PM, "'Mark Rotteveel' m...@lawinegevaar.nl [firebird-support]" wrote:   Ah. It is the exception, because ordering by column index (en order by 1, 3) uses the index of the column in the select list, so by definition that column needs to be in the l

Re: [firebird-support] SQL standard for sort fields and returned fields

2016-05-09 Thread 'Mark Rotteveel' m...@lawinegevaar.nl [firebird-support]
Ah. It is the exception, because ordering by column index (en order by 1, 3) uses the index of the column in the select list, so by definition that column needs to be in the list. Mark - Bericht beantwoorden - Van: "liviusliv...@poczta.onet.pl [firebird-support]" Aan: Onderwerp: [fire

Re: [firebird-support] SQL standard for sort fields and returned fields

2016-05-09 Thread liviusliv...@poczta.onet.pl [firebird-support]
Hi, i am talking about your post “I don't have the SQL standard at hand right now, so I can't double check. As far as I know, the SQL standard allows you to sort on any field, even if it is not in the select list (with the exception of course of ordering by column index).” and about line “with

Re: ODP: Re: [firebird-support] SQL standard for sort fields and returned fields

2016-05-09 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 2016-05-09 15:29, liviuslivius liviusliv...@poczta.onet.pl [firebird-support] wrote: > hi, > > could you explain this exception? > And i also have not sql standard to look into and need some exact > confirmation about this (something like Sql92 or sql2013.. say this) I see no exception, did yo

RE: Re: [firebird-support] SQL standard for sort fields and returned fields

2016-05-09 Thread Ralf Jansen ralf.jan...@mailstore.com [firebird-support]
@yahoogroups.com [mailto:firebird-support@yahoogroups.com] Sent: Montag, 9. Mai 2016 16:30 To: firebird-support@yahoogroups.com Subject: ODP: Re: [firebird-support] SQL standard for sort fields and returned fields hi, could you explain this exception? And i also have not sql standard to look into and

ODP: Re: [firebird-support] SQL standard for sort fields and returned fields

2016-05-09 Thread liviuslivius liviusliv...@poczta.onet.pl [firebird-support]
ebird-support]" Data: 09.05.2016 13:20 (GMT+01:00) Do: firebird-support@yahoogroups.com Temat: Re: [firebird-support] SQL standard for sort fields and returned fields   On 2016-05-09 11:45, liviuslivius liviusliv...@poczta.onet.pl [firebird-supp

Re: [firebird-support] SQL standard for sort fields and returned fields

2016-05-09 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 2016-05-09 11:45, liviuslivius liviusliv...@poczta.onet.pl [firebird-support] wrote: > Hi, > > This is not specific to Firebird question but: > is something in SQL standard specification about sorted fields must > be > also returned? > I mean: > > SELECT > [FILM_DATE,]FILM_TITLE > FROM > FILMS

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

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

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

2016-04-07 Thread Tomasz Tyrakowski t.tyrakow...@sol-system.pl [firebird-support]
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,

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

2016-04-06 Thread 'Arno Brinkman' fbsupp...@abvisie.nl [firebird-support]
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 R

Re: [firebird-support] SQL Optimation best way

2015-11-04 Thread 'Arno Brinkman' fbsupp...@abvisie.nl [firebird-support]
Hi, You’re already have good suggestions, but mainly we’re missing input of what you exactly want and how the data is related. Here another SQL example which could bring you by a solution: SELECT SUM(a.Field3), dt.SumFieldC FROM TableA a LEFT JOIN (SELECT b.FieldA, b.FieldB, SUM(b.Field

Re: [firebird-support] SQL Optimation best way

2015-11-04 Thread Ann Harrison aharri...@ibphoenix.com [firebird-support]
On Wed, Nov 4, 2015 at 8:41 AM, 'checkmail' check_m...@satron.de [firebird-support] wrote: > > > two tables > > > > A: > > Field1, Field2, Field3, Field4, Field5 > > > > B > > FieldA, FieldB, FieldC > > > > Now I would like to get the following: > > > > Sum(A.field3) where a.field1 = condition1

Re: [firebird-support] SQL Optimation best way

2015-11-04 Thread setysvar setys...@gmail.com [firebird-support]
>A.field1 and field2 are the intern project number, b.fielda and b.fieldb are the extern ordernumber year and number. >Sum(A.field3) where a.field1 = condition1 and a.field2 = condition2 >In the same statement I would include >Sum(b.fieldc) where b.fielda = a.field4 and b.fieldb = a.field5 >I

Re: [firebird-support] SQL for TCC

2015-08-26 Thread Robert martin r...@chreos.com [firebird-support]
Sorry set the SQL to the wrong 'support' email. Please ignore. Thanks Rob On 27/08/2015 12:07 p.m., Robert martin r...@chreos.com [firebird-support] wrote: > UPDATE CsItem > SET YeRef = 7051 > WHERE ItemRef IN (688421, 688413, 688405, 688438, 688446) > > To run the above > - On any ONE machine

Re: [firebird-support] SQL help, please

2015-05-30 Thread brian br...@meadows.pair.com [firebird-support]
On Sat, 30 May 2015 09:12:09 -0400, you wrote: With thanks to Jonathan Finch, I think I have the problem sorted. Substring comparisons are the answer (fairly obviously) but the bit I was missing was the idea of wrapping the string of codes AND the integer field in commas, to cope with the first an

Re: [firebird-support] SQL puzzle: Order based on Prerequisite

2015-04-12 Thread Svein Erling Tysvær svein.erling.tysv...@kreftregisteret.no [firebird-support]
>In a table called "Steps", I have the following fields: > >ID, B4Me, Dsc, > >-ID field contains a unique ID for each record >-B4Me contains the ID of some other record in the table that MUST appear in a >result set, BEFORE this record. B4Me may be null. This is called the "B4Me" >order. >-Record

Re: [firebird-support] SQL puzzle: Order based on Prerequisite

2015-04-11 Thread liviusliv...@poczta.onet.pl [firebird-support]
S NULL THEN ID ELSE B4ME+1 END, other_fields FROM STEPS ORDER BY 1 ASC, 2 ASC regards, Karol Bieniaszewski From: mailto:firebird-support@yahoogroups.com Sent: Saturday, April 11, 2015 10:03 AM To: firebird-support@yahoogroups.com Subject: Re: [firebird-support] SQL puzzle: Order based on Prere

Re: [firebird-support] SQL puzzle: Order based on Prerequisite

2015-04-11 Thread liviusliv...@poczta.onet.pl [firebird-support]
Hi, you must rethink what you try to retrive. What is then sense of returning somethink in case of cycles? If you have cycles then you do not get something before.. But if you need something strange then it is simple ID as integer select CASE WHEN B4ME IS NULL THEN ID ELSE B4ME+1 END, other_fi

RE: [firebird-support] SQL Creation question

2015-04-01 Thread michael.vilhelm...@microcom.dk [firebird-support]
So simple. Thank you

RE: [firebird-support] SQL Creation question

2015-04-01 Thread 'Norbert Saint Georges' n...@tetrasys.eu [firebird-support]
Select * from group, supplier Norbert Saint Georges TetraSys Oy Bergantie 69, FI-02540 Kylmälä Tel. : +358 (0) 400 27 25 18 E- mail : n...@tetrasys.fi De : firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.co

Re: [firebird-support] SQL Error -104

2014-09-13 Thread Svein Erling Tysvær svein.erling.tysv...@kreftregisteret.no [firebird-support]
>i just don't get it what the heck i'm doing wrong. I would like to have >something like that: > >select ba.artno >from mov_invoices mi, bas_articles ba >where mi.invdate between '2014-05-01 00:00:00' and '2014-08-01 00:00:00' >and case >when (ba.artno like '90__') then '9000' >when (ba.artno like

RE: [firebird-support] SQL Error -104

2014-09-12 Thread 'Leyne, Sean' s...@broadviewsoftware.com [firebird-support]
> i just don't get it what the heck i'm doing wrong. I would like to have > something like that: > > select ba.artno > from mov_invoices mi, bas_articles ba > where mi.invdate between '2014-05-01 00:00:00' and '2014-08-01 00:00:00' > and case > when (ba.artno like '90__') then '9000' > when (ba.

Re: [firebird-support] SQL Log/Rollback?

2014-06-23 Thread Ann Harrison aharri...@ibphoenix.com [firebird-support]
> On Jun 22, 2014, at 11:35 PM, "Jack Cane jwc...@enwphotos.com > [firebird-support]" wrote: > > Please point me to documentation where I can read further about whether > Firebird has the ability to roll back to a previous state, and/or > location/name of a log that can be queried for this p

RE: [firebird-support] SQL error code = -104 Unexpected end of command, from Delphi App

2014-01-08 Thread Maya Opperman
1. Your insert is failing, but you haven’t provided us with the SQL you are using for an insert. Also, check the refresh SQL property of your DB component. 2. I notice you have an ; at the end of all your SQL. I don’t think that is necessary when entering the SQL into the SQL proper

Re: [firebird-support] SQL error code = -104 Unexpected end of command, from Delphi App

2014-01-08 Thread homer
Thanks for the advise. I sincerely appreciate it. In my defense, this Delphi application has just shy of 900,000 lines of my code. The Data Module alone has 115 TIBCQueries. As you might imagine, they all successfully execute Insert, Post, Open, and Close commands more times than I can count. No

Re: [firebird-support] SQL error code = -104 Unexpected end of command, from Delphi App

2014-01-08 Thread Helen Borrie
At 10:37 a.m. 9/01/2014, ho...@agencybusys.com wrote: >I looked through previous topics, and although this seems like a common error, >I didn't find one quite like my situation. You realise this is a problem with your Delphi client code, don't you? And that this list is not a Delphi support l

Re: [firebird-support] sql and firebird

2013-11-04 Thread Mark Rotteveel
On 4-11-2013 15:52, checkmail wrote: > > > Hello, > > I would update a table (Primary key year and number), all records with > the same ordernumber for example – but not the record where is currently > in use and already updatet. > > Update table set field = value where ordernumber = XXX and (not r

Re: [firebird-support] SQL ignores spaces?

2013-04-24 Thread Frank
On 04/24/2013 12:44 PM, uwekeim wrote: > Hello, > > i have a table with a field F1 sized VARCHAR(1). > > Some values are '' (field is empty). > > Astonishing following SQLs produce the same result: > > select * from test t where t.f1='' > > or > > select * from test t where t.f1=' ' > > or

RE: [firebird-support] sql error

2013-03-20 Thread Svein Erling Tysvær
>But now I get: Token unknown, column 1 line 24 ( Without seeing at least 24 lines of code, it is hard to tell why it doesn't understand the parenthesis at the beginning of line 24 ;o) >with this code I get an sql error, but it works until today perfect :o( What has changed? Have you upgraded a

Re: [firebird-support] sql error

2013-03-20 Thread Mercea Paul
On 2013.03.20 11:34 AM, Olaf Kluge wrote: > select first 1 prio from wgetnextprio where kount = (select max(kount) > from wgetnextprio)into :prio_to_find; I can't say anything about your error but i think this query can get better results : select first 1 prio from wgetnextprio order by kount des

RE: [firebird-support] sql query in firebird

2013-02-11 Thread Leyne, Sean
Olaf, > fb 2.1 cs is running > > Now I have four tables: > > Persons: > ID > Name > EMAIL > > ORDER: > ProjectID > PERSON_WHO_GET (references ID from Persons) > STATUS > > Projects: > ProjectID > Manager (references ID from Persons) > > ProjectSEND: > ProjectID > PERSON_WHO_GET_INFO (refere

Re: [firebird-support] SQL Server to Firebird data migration tools

2012-09-29 Thread Thomas Steinmaurer
>> Are there any free tools for SQL Server to Firebird data migration? > > Not free, but worth every penny/cent, with its multi-DBMS capabilities, > but I'm biased. Database Workbench that is: http://www.upscene.com/go/?go=dbw -- With regards, Thomas Steinmaurer http://www.upscene.com/

Re: [firebird-support] SQL Server to Firebird data migration tools

2012-09-29 Thread Thomas Steinmaurer
> Are there any free tools for SQL Server to Firebird data migration? Not free, but worth every penny/cent, with its multi-DBMS capabilities, but I'm biased. -- With regards, Thomas Steinmaurer http://www.upscene.com/

Re: [firebird-support] SQL Puzzle: Two Way String Matching

2012-05-14 Thread unordained
-- Original Message --- From: "red_october2009" > I need an SQL statement that will return all records where at least > one human name is found in the pet names field (not the other way > around). In this case the only records that qualify are: --- End of Original Message --

Re: [firebird-support] SQL Puzzle: Two Way String Matching

2012-05-14 Thread Norman Dunbar
Evening Red October 2009, > ... > 1 ^ 185 ^ RALF JOEY FRED ^ BRUTUS > 1 ^ 105 ^ KARL JACOB NEWTON ^ SNACKER > 1 ^ 973 ^ MARLEEN MUFFY ABE ^ LUVER POPEYE TANGO > 2 ^ 243 ^ BAXTER MILTON MARY ^ RIPPER JOEY TOMMY > 2 ^ 239 ^ ABIGAIL HARMONY ^ SPOT MUFFY TIPPY > 2 ^ 982 ^ KEVIN PETE PA

Re: [firebird-support] SQL Performance question

2012-02-01 Thread Vander Clock Stephane
it's depend where you filter will be the most evident ie : on VareFrvStrNr or on Dato ... for exemple it their is zillions reccord with VareFrvStrNr = '090179' then it's better to use the index on Dato and read the data in the dato order still will see one row with VareFrvStrNr = '090179' on th

RE: [firebird-support] SQL Performance question

2012-02-01 Thread Svein Erling Tysvær
Hi Michael! >I have a table containing some 33.879.139 records. > >If I do a simple select like this: > > >Select Dato from Transaktioner >Where > VareFrvStrNr='090179' > AND Art=11 > And Transaktioner.Afdeling_ID<>'9' > >it fecthes 11 records within 0.3 seconds. >It will use the index on V

Re: [firebird-support] SQL user management in FB 2.5

2011-10-03 Thread Tomasz Tyrakowski
Dear Helen, Thank you for the clarification. I think this particular user ("IS") was added by our customer in FB 1.0.3, but that's irrelevant. And yes, we've been upgrading the security database along the servers, sticking to dialect 1 for the main databases for lack of a good enough reason to

Re: [firebird-support] SQL user management in FB 2.5

2011-10-03 Thread Helen Borrie
At 08:32 AM 4/10/2011, Tomasz Tyrakowski wrote: >Hi guys, > >Have you managed to make the statement > >alter user IS grant admin role > >work? Or any other alter/create user with an SQL keyword as the user name? >If anybody happened to read somewhere that it's downright impossible, >please post a

Re: [firebird-support] SQL user management in FB 2.5

2011-10-03 Thread Tomasz Tyrakowski
Hi guys, Have you managed to make the statement alter user IS grant admin role work? Or any other alter/create user with an SQL keyword as the user name? If anybody happened to read somewhere that it's downright impossible, please post a link so that other people stop wasting their time searchi

Re: [firebird-support] SQL - what am I doing wrong

2011-09-30 Thread Arno Brinkman
Hi, SET already posted an answer, but here another one SELECT COALESCE( (SELECT CASE WHEN (CAST(a.mdz as timestamp) > CAST('2011-09-30' as timestamp)) THEN 'B' WHEN (CAST(a.mdz as timestamp) < CAST('2011-09-30' as timestamp)) THEN 'C' ELSE 'D' END FROM ( sele

RE: [firebird-support] SQL - what am I doing wrong

2011-09-30 Thread Svein Erling Tysvær
> select > ( select case when (a.mdz is null) then 'A' >when (cast(a.mdz as timestamp) > cast('2011-09-30' as > timestamp)) then 'B' >when (cast(a.mdz as timestamp) < cast('2011-09-30' as > timestamp)) then 'C' >else 'D' > end > >