Take a look here: http://www.firebirdfaq.org/faq361/
I'd add that restore also has a -use_all_space option. If you don't specify
this, then pages are filled to approximately 80% (80% is preferable over 100%
unless it is a read-only database). See
Hello! Generally speaking, regarding performance, is expensive having
calculated fields?
Not complex ones, I mean this type of thing:
... COMPUTED BY (cast(qty * price * tax / 100 as money 2))
So far I don't notice any difference but I'd like to hear opinions about
whether is a good
idea
I have a table with one ID-Column and one Sort-Column.
I need the ID from the record with the lowest sort-number.
Sortnumbers are not unique (can be doubled).
Can I do this with one SQL-Statement?
If you want one row returned:
Select ID_column
From Table
Order by Sort_Column
Rows 1
If you
Greetings All,
I would like to pass into a stored procedure two social security numbers for
comparison and have the result tell me if one character has changed,
or if two characters were switched or if it does not compare at all.
Has anyone done anything like this they could share? Or is it
Yes I just checked my original query will return 6 rows without the distinct
OK, then lets add another CTE so that the calculations aren't multiplied:
with tmp1(surname, name, trxdate, source, job_number, creditnr, sourceid,
serviceadvisOR) as
(select distinct trim(c.name||' '||c.surname),
Hi Set
Wow your query runs like a bat out of hell J 0.16 Milliseconds !! and it
easier to maintain as you say.
The only issue is that it somehow multiplies the totals by 6 on all results
as compared mine?
i.e. mine will return an invoice total of say 18500.00 and yours will return
111000.00
At first glance, your plan seems OK. However, it would be better if we also
could see the index definitions as well as get some information about index
selectivity. And, this list removes attachments, so please post the text of the
query as part of the message.
Set
Stef van der Merwe wrote:
I
Hi all,
some years ago I developed a web application based on Interbase, Win98, PHP,
Apache. During those yeas has been lightly updated with lase
release of software, now the we application (10 users) use the follow:
Microsoft Server 2012 (64bit)
Apache 2.0
PHP 5.4
Firebird SQL 1.5 (3
There can be lots of reasons for a database application being slow. If
the database have huge tables, and the application is written thinking
in terms of tables as opposed to datasets, then things will be slow
Svein.
An interesting comment, to me anyway, regarding tables vs datasets.
Unlike Vlad, Helen and Thomas, I know next to nothing about problems like yours
(I'm good at SELECTs, which is way different from corrupted backups). Hence,
listen more to them than to me.
gbak:restoring privilege for user SYSDBA
gbak: ERROR:action cancelled by trigger (3) to preserve data
I did a mistake with a query I wrote (Fb 2.5.3 or 2.5.4), but to my surprise
Firebird did not complain and gave me the desired result. What I found was that
whilst Firebird complains about missing GROUP BY if writing something like
SELECT 'This does not work', RDB$RELATION_ID,
Hello. I used Firebird 1.5.6 on server on WIN7, a database with a role with
full rights, and a user defined in ROLE, USER.
I have a problem. In the network with a application, on different client
station, login with the USER, all functions work OK.
From server or another WIN7 station, with USER
Hello,
is it possible by using CAST or in any other way to get database error when
casting such number to integer?
SELECT CAST('13.245' AS INTEGER) FROM RDB$DATABASE
This gives 13 but instead I would like to get an error because precision is
lost.
However, I would like to NOT get an error when
3. when i change proc to use execute statement with parameters
SET TERM ^ ;
CREATE PROCEDURE MY_PROC_CALC_EXEC_PARAM(ID INTEGER) RETURNS(SUM_AAA INTEGER)
AS
DECLARE VARIABLE VAR_SQL VARCHAR(1000);
BEGIN
VAR_SQL = 'SELECT SUM(AAA) FROM TABLEY WHERE ID=:ID';
EXECUTE STATEMENT (VAR_SQL) (ID :=
SELECT * FROM
TABLE_2 T2
INNER JOIN
TABLE_1 T1
ON
T2.TABLE_1_ID = T1.ID
After executing this query I am getting such plan:
PLAN JOIN (T1 NATURAL, T2 INDEX (FK_TABLE_2))
Why in case of TABLE_1 optimizer did not chose index PK_TABLE_1? And why I am
getting error when i try to enforce it
Except that grouping by OPS_ZIP would not accomplish the same thing. Multiple
zip codes map to the same REGION_ID and the zip codes might not be contiguous.
Guess I'm going to have to rethink this.
What about
with tmp(PB_LOAD_TYPE, APPT_DATE, REGION_ID, PICKUP, DELIVERY) as
(SELECT
Hi guys.
Hi Bruce!
I am having such data:
ID DATE_TIMETYPE
101.01.2015, 00:00:00.000A
201.01.2015, 00:01:00.000A
301.01.2015, 00:02:00.000A
401.01.2015, 00:10:00.000B
501.01.2015, 00:15:00.000B
601.01.2015, 00:20:00.000A
7
[I've removed irrelevant details from your original question]
I sincerely hope I am in the right place. We have a query which takes 4
minutes 30 seconds to execute this is simply
too long. Please help !
Definitely, Stef, most performance problems can be solved on this list, and I
agree
Hi,
I have been a major contributor to Firebird since 2003, also my previous
company BASX, which I was the Head developer of,
was a gold sponsor of Firebird.
I have recently moved to another company that uses SQLAnywhere.
They are interested in moving to Firebird.
But Firebird does not have
I have below SQL and DDL of respective columns used in this SQL.
Below sql takes 6-7 seconds to give the result.
Would it be possible to bring the output time to 1 seconds, coz there are some
other operartion I need to perform based on this sql output withing short
period of t ime.
SQL:
Hi SET,
Nice to see you here, but I am getting below error after executing your sql, i
think group by clause is needed, would you please help?
Yes, sorry I forgot group by:
with TMP(PK_JOB_ITEMS) as
(select distinct PK_JOB_ITEMS
from CRM_JOB_ITEMS where FK_JOB =
Hi SET,
I tried as below way by adding Group By clause:
with TMP(PK_JOB_ITEMS) as
(select distinct PK_JOB_ITEMS
from CRM_JOB_ITEMS where FK_JOB = '{8BDDED49-8509-48C1-A169-B7E68A74C230}')
select
Sum(cdi.QUANTITY) AS Delivered,
cdi.FK_JOB_ITEM
from tmp t
join CRM_DOCUMENT_ITEMS cdi on
CRM_DOCUMENT_HEADER Table - PK_DOCUMENT_HEADER is primary key and having
seperate index on this column as well
What do you mean by this, Vishal?
I think it was fixed a while ago, but duplicate indexes used to confuse the
optimizer, so PK_DOCUMENT_HEADER ought not to be both the primary key and
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.
-Records will be
Can the question be rephrased as you being interested in which sets are
identical, Elias? If I understand things correctly,
I would assume double negation to be the simple answer you're looking for:
with tmp(id) as
(select distinct id from CRITICALPARAMVALS)
select t.id, t2.id
from tmp t
join
Ok, used the +0 and worked.
On v1.56 I was used with setting up a high granularity data column (col04Int -
part of the primary key) with a True/false (0/1) type of column
(ColDetSmIntFlag) to boost the selectivity of the index
IXColDetSmIntFlag. I kept the index with that configuration for a
Hi all,
I'm trying to upgrade an app to v2.54 from v1.56 but there are some queries
that aren't planning the way they should.
I have this query:
Select Distinct a.col01Int, a.col02SmInt, a.col03SmInt, a.col04VarCh45
from dettbl b
Inner Join msttbl a on (a.col01Int = i.col01Int and
Hi everyone!
This might not be a straightforward Firebird question, but I'm hoping there's
a feature I'm unaware of that can help me beyond plain-vanilla SQL.
I have two tables. The first is a list of names of critical parameters, and
the second relates certain object IDs, critical parameter
Actually, the problem isn't with FK_dettbl, but with the A Natural. In a
Master detail relationship with 450K+ rows in the master and 800K+ rows in the
detail, that natural is a killer.
The problem is that Firebird thinks that
PLAN SORT (SORT (JOIN (A NATURAL, B INDEX (FK_dettbl
is a
I would expect numbers in the range -2147483648 to +2147483647 to be accepted
(the size of an integer), and then there’s a separate field for storing whether
things are shifted to the left or right. I’ve no experience or theoretical
knowledge confirming this, but your examples would fit such a
then why here is an error?
SELECT CAST('123456789.23' as numeric) FROM RDB$DATABASE
Logically speaking I don't understand why
SELECT CAST('123456789.23' as numeric(9,0)) FROM RDB$DATABASE
is failing when
SELECT CAST('1.23' as numeric(1,0)) FROM RDB$DATABASE
succeeds.
Practically, I guess
is possible to get week of the year within year?
I see that built in functions only support ISO-8601 (or i do not know some
parameter)
Actually, Karol, “week within year” is not the week, Karol. 1 January could be
week 53 and 31 December could be week 1. If you want to consider 1 January
HI Louis,
It's pretty cool, but i need only in SQL, that too same number for all records
for same employee and next incremental number for all records of the another
employee.
SET any help offered ?
The first thing that comes to mind, is EXECUTE BLOCK (which is basically a
STORED PROCEDURE
For iLoop as Integer=0 to grid.Rows.Count-1'Grid Has 100,000 Rows
'-Sometimes Hang Here Also-
rdr = Get_Reader(USP_CHECK_AND_GET_ITEM_EXIST('
Mid(Trim(dicFields_Name.Item(SP_ITEM_CODES)), 1, 20) ','
Mid(Trim(dicFields_Name.Item(ITEM_PART_CODES)), 1, 20) ','
update never fails but it fails in insert query. loop run in a single
connection with a new datarows in same query.
I think it is about time to show us some code (not all). Could it be that
another transaction not visible to your current transaction has inserted a row
that creates a lock
please, somone guide me where i am wrong
This support list is for the Firebird database. For the .NET
providers, you need to subscribe to the firebird-net-provider list:
List-Subscribe:
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider,
At first glance it sounds
Sukhen wrote:
update never fails but it fails in insert query. loop run in a single
connection with a new datarows in same query.
I answered:
I think it is about time to show us some code (not all). Could it be that
another transaction not visible to your current
transaction has inserted a row
You may consider
WITH TMP(My72, cFrom, cTo, dValueFrom, dValueTo) as
(SELECT CAST(:My72 as integer), US1.dValue, US2. dValue FROM RDB$DATABASE
LEFT JOIN dSetValue('Current Year', 'From') US1 ON (1=1)
LEFT JOIN dSetValue('Current Year', 'To') US2 ON (1=1))
SELECT whatever
FROM TMP t
CROSS JOIN
my impression was the other way arround ;-)
Then I'm either misreading your e-mail, or you've switched the examples around?
When I change the charset in isql to any charset, that is definitly not
used in the database I always get the same output from isql. I was
expecting that the presentation
I have a query like this:
select
artikli.a_sif,
v1.v_txt,
v2.v_txt,
coalesce(sum(magkol.k_total),0) total,
coalesce(sum(magkol.k_nabcen * magkol.k_total),0) vrednost,
coalesce(sum(magkol.k_nabcen * magkol.k_total),0)/
coalesce(sum(magkol.k_total),1) nc,
Hi;
I am using FB 2.5.3. in a fast environment (win8 64bit - QuadCore 3.4 Ghz - 8
GB ram).
If I run this query it goes very very fast and returns 84 records:
Preparing query: select distinct PROC from GEST where (GEST.FSAL
between '20080801' and '20080812') order by PROC
Prepare time: 0.007s
Thanks Set for starting me on the right track. Please see my finalized query
below which gets me to the expected result.
Good to see that you got the result you wanted, Bhavbhuti! I do have two
comments regarding your final result:
1) Why do you use ORDER BY within the CTEs? In the outer
On Feb 16, 2015, at 4:22 AM, josef.gschwendt...@quattro-soft.de
[firebird-support] firebird-support@yahoogroups.com wrote:
we have 2 tables
For each record in Table1 there are 2 records in Table2.
Table1 (T1)
==
1
2
Table2 (T2)
T2T1
==
11
21
32
Dataset:
1Haemogram Report 1Routine
Haemogram
1Haemogram Report 5Diff. Count
(Mature Cells)
1Haemogram Report 10 Special
Investigations
2Haemogram Report
I am having similar issues. Are there any resources to read up on this?
What do you mean by similar issues, Louis? Zoran first showed us his SQL and
plan, so that we more or less could see that his SQL, plan and indexes seemed
good (that's arguably the most common reason for speed problems).
There is at least a good alternative, Frank Ingermann showed how to do
something very similar when calculating the amount of ingredients required when
baking a marble cake at a Firebird conference a few years ago. He used a
recursive CTE. Whether a recursive CTE is simpler than a recursive
I saw the same as you, and made the following test:
- Opened my application.
- Executed the option which locks a record (executes a SELECT * FROM TABLE1
WHERE (FIELD1 = 'some value') WITH LOCK).
- Opened the database with IB_SQL.
- Looked in table MON$STATEMENTS. I found many records. Many of
I looked in a database, and in MON$STATEMENTS tabla I have the following
fields:
MON$STATEMENT_ID
MON$ATTACHMENT_ID
MON$TRANSACTION_ID
MON$STATE
MON$TIMESTAMP
MON$SQL_TEXT
MON$STAT_ID
How can I detect which is the record I have to delete to unlock my record?
This is the only table I have to
May be I can modify or delete some record in any MON$ table or do some other
thing?
I typically locate and delete records from MON$STATEMENTS. Mind you, that is
2.5 and typically when I have a long-running query. Don't know whether deleting
from this table is possible or safe with 2.1 or
Hi Tomas! I just mean week days...
Something like DateDiff() but only counting from monday to friday.
I have a function in Delphi for that. I could make an UDF I think. I just
wander if there is something already done. I thought it was something very
used... probably is not?
I don't know
The main purposes of explicit locks are (1) to prevent expensive handling of
update conflict errors in heavily loaded application
this is the exact reason I try to avoid conflicts. My threads can wait but
they should not raise exceptions.
I always though that it is possible to avoid such
Hello,
thanks Set, makes my test unnecessary!
But I'm thinking a little bit about my original problem.
Would it make sense to add a tracker entry for optimization of
subselects without reference to outer query?
I think that they should get evaluated and transformed to something
Hello,
I save values in some tables (simpler description)
First a Table who saved the timestamp of the mensuration
Table A timestamps
ID primary key
TS timestamp
Second a Table with the measured data (25 records/measured sensors will be
saved every 10 Minutes, one record in Table A, 25 in
Hello,
Thanks for the answer.
How can I optimize if I want to use a DML command in conjunction
with a subselect, e.g.
delete from test where Id in (
select min(t.Id) FROM test t
group by t.reference, t.key
having count(*) 1
)
Hi Björn!
I don't think there is any simple way to
I don't think there is any simple way to make a delete with a
subselect as the only part of a where clause perform great on
largish tables. That is, using EXECUTE BLOCK (which doesn't exist on
older Firebird versions) should perform OK:
execute block as
declare variable id integer;
Any ideas?
Hello @ll,
I would like to group my records by day or month. The date is saved as
timestamp. If I do the following,
SELECT EXTRACT(day FROM m.messzeit), COUNT(*) as CountMessages
FROM te_messzeiten m
GROUP BY EXTRACT(day FROM m.messzeit)
I get all days (1 to 31), but I need group
FB 1.5x
I have a SQL statement that returns the results I want--giving me a count on
the detail dataset
(ClientRegHistList is a detail list on ClientRegHis, more info below)
select C.RegDate, Count(Client_ID)
from ClientRegHist C,
ClientReghistList CL
where
where name like 'Ab%' returns any entry of the table, where name start with
Ab except those ones containing character -. Using starting with or
containing
the same database entries are missing.
Firebird simply doesn't exclude entries depending on which character follows
what you're searching
I have been an interbase guy about fifteen years ago and loved to see it go
open source. I used to work with Paul Beach (Hello, if you're here,Paul)
Yes, Paul Beach is still here, he’s working with other InterBase and Firebird
experts at IB Phoenix. Here you can see who they are:
select
iif('em...@testdomain.com' similar to
'([_a-zA-Z\d\-\.]+@[_a-zA-Z\d\-]+(\.[_a-zA-Z\d\-]+)+)','ok','fail')
from rdb$database
Says 'invalid string' and 'invalid pattern', but the pattern it´s the same in
other languages for validate email address.
I know nothing about regular
Hello All,
I have a table regioni with 164 rows (r_id), and also stored procedure which
returns some data like (r_id, value).
When I try to use
select
regioni _ID,
stored_procedure_value
from regioni
left outer join stored_procedure (:DATE1,:DATE2)
I only get number 20 rows for the R_ID
Dear Thomas,
thank you for your answer. I have experienced that pssing by the trigger is
functioning well.
The only thing wrong is that the loop has no effect on the data of the
records. And I hoped that someone could check the statement syntaxwise. Maybe
I am doing something wrong in my
Thank you Svein, that's what I tried but kept getting:
SQL error code = -104.
Invalid expression in the select list (not contained in either an aggregate
function or the GROUP BY clause).
and yet it now works. I thought it must have been because I was accessing code
in the iif(...). I must have
for select
iif(n.code=1,sum(n.amount),0),
iif(n.code=2,sum(n.amount),0),
iif(n.code=3,sum(n.amount),0),
n.sell_date
from new_table n
where n.sell_date between :fromdate and :uptodate
group by n.sell_date,n.code
Hi Sean/Dmitry, I've mingled my answers to your suggestions.
Does the plan change to INDEX if the condition would be:
S2) on p.icd10 in (t.icd10, t.icd3)
S3) on p.icd10 = t.icd10 or p.icd10 = t.icd3
D2) ON p.icd10 = t.icd10 OR p.icd10 = t.icd10
No, these all keep the original plan:
PLAN JOIN
Fb 2.5.1
I have an EXECUTE BLOCK statement, for which a small part goes NATURAL where
I'd expect it to use an index associated with a UNIQUE CONSTRAINT.
I would expect
JOIN icd10_purres p ON p.icd10 IN (t.icd10, substring(t.icd10 from 1 for 3))
to use an index, maybe something along the lines
Hi!
I have some lines in firebird.log like this:
===
cxv.servers.netTue Nov 4 11:37:38 2014
Sweep is started by SWEEPER
Database SkyNetInt
OIT 1221095, OAT 1231335, OST 1231313, Next 139981575359934
cxv.servers.netTue Nov 4 11:37:46 2014
Hi.
in firebird 2.5
Simple descrip tables
table_ud
ud_id integer not null primary key
field_ud varchar(6)
row count: 383322
table_tmp
ud_id integer
cnd integer
index (cnd)
row count: 617
UPDATE table_ud ud
SET ud.field_ud = '201401'
WHERE ud.ud_id in (SELECT t.ud_id FROM table_tmp t
Greetings All,
Firebird 1.5.3
Should be elementary but, I'm drawing a blank on how to accomplish this.
I have a table (ACCT_CASE_COURT) that contains these fields (among others):
ACCT_CASE_COURT_IDINTEGERNOT NULLPK
ACCT_IDINTEGERNOT NULL
CASE_IDSMALLINTNOT NULL
is required to return the
entire result set if having the aggregate functions compared to a simpler query
without them (but with ORDER BY since that makes it more easily comparable)?
Set
On 21.10.2014 21:15, Svein Erling Tysvær
svein.erling.tysv...@kreftregisteret.no [firebird-support] wrote:
What
I've not been able to find any topic that comes close to addressing my
question, and it seems so basic, I'm guessing that I'm missing something
fundamental.
I have queries that specify for ranges in varchar fields and return those and
populate my VirtualStrings in a standard alphabetical
What about
FOR WITH TMP(MyDateTime, MySum) as
(SELECT MIN(dateandtime), SUM(Value)
FROM gen_data(...))
SELECT g.id, g.name, g.dateandtime, g.value, t.MyDateTime, tMySum
FROM gen_data(...) g
CROSS JOIN tmp t
Of course, you may want a different join to CROSS JOIN.
HTH,
Set
Maybe I was not clear as I should be but here is an example in Firebird:
select something,anotherthing,(select sum(thirdthing) from second b where
b.something = a.something) total from a where
(select sum(thirdthing) from second b where b.something = a.something) 10
tray sentence:
select
ACCT_CASE: Case Management table
ACCT_IDINTEGER NOT NULL PK
CASE_ID SMALLINT NOT NULL PK
CLT_ID INTEGER NOT NULL FK to CLIENT table Need this for the JOIN
DEBTOR_CASE_DEBT: Allows for multiple PERSON's to be associated with a DEBT
ACCT_IDINTEGER NOT NULL
Text, binary, it's all the same to gbak. Try the -g suggestion - if gbak is
cleaning out garbage, it's slow.
But, surely, the garbage has to be cleaned out sooner or later, and doing it
in a backup run is the cheapest way to do it,
as every record is being visited anyway? (Compared to, say,
All values for inserts are converted to string so there are no parameters.
Sorry to hear that.
MyStatement.SQL.Text:=’INSERT INTO MyTable(Field1, Field2) VALUES (:Param1,
:Param2)’;
MyStatement.Prepare;
while not eof(InputFile) do
begin
readln(InputFile);
Hi all
I would have attached a screen shot of the sample data but I guess that is not
possible. What I am trying to achieve right now is get the time difference in
hh:mm format to the user
tStartTime and tEndTime field values
26.08.2014, 08:38:00.00026.08.2014, 09:45:00.000
26.08.2014,
Obviously the logic of my application is not the best, but it needs to pass
through a special interface, that transforms classic cobol read/write
routines, in sql statements. This brings to the need to have a single
commit after a single insert command of a single record. I know this is not
good,
Hi Sean, thanks for the contribution.
Some answers to your requests:
1) Logic of application.
It is a Microfocus Cobol legacy application, with latest (2014) x64 runtime.
The long time is obviously not relative to a simple sql command, but to the
overall execution.
We have developed a
If your database has the right ODS version, i.e. that it is created with
Firebird 2.5, then you can just use the character set – i.e.
CREATE TABLE MyTable(
MyChineseField Varchar(50) character set GB18030,
MyNorwegianField Varchar(50) character set iso8859_1 collate no_no,
MyASCIIField
The sql is below. It works fine until I add the BETWEEN statement. Hopefully
you can point out something simple that I am doing wrong.
SELECT description, WOReqd, Addontype as AddonTypeID, RatebookID FROM
rentaladdons LEFT JOIN rentalratebook on rentaladdons.ratebookID =
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 '80__')
Hi,
We have shipped Firebird Embedded bundled together with our product for a few
years now and the system is currently in production at several thousand of our
customer's sites.
Currently we are using Firebird Embedded 2.5.1 with the latest .NET-driver and
a stack consisting of Castle Active
Hallo,
I have two queries:
First (results: ANNO, IMPONIBILE):
select
EXTRACT(YEAR FROM DT.DATA_DOCUMENTO) AS ANNO,
SUM(DC.IMPORTO) AS IMPONIBILE
from
DOC_CORPO DC,
DOC_TESTA DT,
VOCI V
WHERE
DT.ID = DOC_TESTA_ID
AND DT.DOCUMENTO_ID 'PRO'
AND EXTRACT(YEAR FROM
CASHBOXID is already know. It is a reference to a table that we don't touch in
the transaction.
This table contains the current total amount of a cash box at the begging of
the day.
So when I try to load data for a cash box a java code checks is there record
for this cash box for current day.
This is the definition of the table that locks on insert:
CREATE TABLE CASH_CASHBOX_DAY_AMMOUNT
(
CASHBOXID INTEGER NOT NULL,
DATE_TIME NUMERIC( 18, 0) NOT NULL,
AMMOUNTNUMERIC( 18, 0),
CONSTRAINT PK_CASH_CASHBOX_DAY_AMMOUNT PRIMARY KEY
Hi,
I'm using Firebird 2.5.3, and I am looking for text in a memo field, eg.
I take it you mean BLOB or VARCHAR, I've never heard of memo fields in Firebird?
Select * from mytable t where t.mymemo like '%find me%'
The will only find
find me
and not
FIND ME or
Find me or
Find Me etc
I'm tempted
Select * from mytable t where t.mymemo like '%find me%'
You can create a computed index for this:
CREATE INDEX idxname ON mytable COMPUTED BY (lowercase(mymemo))
Such an index does not help for LIKE '%...', it can only be used if the first
character is a real character (i.e. not % or _).
They all use READ COMMITTED isolation.
It is an application that runs in JBoss App server so I have single datasource
defined that uses READ COMMITTED.
Blocked statements are insert and update. Selects are not blocked.
Why are inserts blocked? That should not happen unless you
a) don’t
Hi,
I found that after upgrade from FireBird 2.1.5 Update 1 to 2.1.6 my
query stop working with error 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). The same error occur on 2.5.3
select
Hi,
I overcome this issue with this query
select
ke.I_ID_GRUPY,
ke.C_SYMBOL,
(
select first 1 cs.C_OPIS from T_CENY_SKLADNIKI as cs
left join T_CENY_W_OKRESIE as cwo on (cwo.I_ID_CENY_OKRS =
cs.I_ID_CENY_OKRS)
where cs.C_SYMBOL = ke.C_SYMBOL and cwo.I_ID_CENNIKA = any (select
Hi, I'm looking at a system that I have not touched for some years and
wonder if there is a way to improve this code. This all works, but is
there a better or more efficient way? I can't think of how to combine
them into one 'where' statement.
Basically I look for a part based on
Hello,
the following sql statement is almost done, just one thing is problematic.
In the table tlager_sum I have two types of amounts, one of typ 1, one of typ
2. I just need the one of typ1. But if the material not in the table listet
or just für typ 2, and there is a minimum inventory in the
I think I have it:
SELECT TT.TEILENR, TT.BEZEICHNUNG, LS.MENGE, TT.MINB, LS.TYP, TT.TYP
FROM TTEILE TT
LEFT JOIN TLAGER_SUM LS
ON TT.TEILENR = LS.TEILENR
AND LS.TYP = 1
WHERE TT.TYP=1
AND (LS.MENGE IS NOT NULL
AND LS.MENGEtt.minb
OR TT.MINB0 and ls.menge is null)
ORDER BY TT.TEILENR;
The and
The problem comes with the second. (1, 'Bob Jacobs'), (2, 'Bob Jacobs'), (3,
'BOB JACOBS'), and (4, 'bob jacobs') constitute an acceptable set of rows;
(2, 'Bill Hafner') and (2, 'BILL HAFNER') do not. That is, given a value for
CORPORATION_S_KEY, there shouldn't be case-variants for the NAME
If (:In_vin = :Out_BikeLast8Vin) then BEGIN
Update Total_sales_to_part_cost_match
set TSPM_BIKEYEAR = :Out_BikeYear,TSPM_BIKEMAKE =
:Out_BikeMake, TSPM_BIKEMODEL = :Out_BikeModel, TSPM_LAST8VIN =
:Out_BikeLast8Vin;
Given that your stored procedure will
Hi,
Is it possible to see from the systems tables when a database object was
created?
For instance I want to try and find out when a specific trigger was created
on the database, is this possible?
table: MON$DATABASE
field: MON$CREATION_DATE
I think that is just the creation date (or
In my environment I have a software which insert new rows on a certain table.
This software and the firebird server is running on the same machine.
I have a software running on a client which query the the server.
The problem is there are some sort of cache, because I'm getting the old rows.
Thomas,
I usually solve this kind of problem with recusive CTEs providing a
counter for the records returned, thus a simple select statement can
nicely filter on this kind of property without row numbers functionality.
Can you provide an example, please.
I, for one, can't imagine how a CTE
$CATEGORY=str_replace(','',$_REQUEST['CATEGORY']);
I convert html entities to text i can use on the web pages.
I use this for being able to retrieve it back as normal characters.
I use this on all my inserts.
And, then i want to put it in the category field in the table.
Let's say the category
1 - 100 of 124 matches
Mail list logo