Eric,
Yes, the optimizer can use an index with a WHERE on a VIEW, but only when the
view is local, not when using EXECUTE STATEMENT on an external database.
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
From: Eric Guéguiniat eric.gueguin...@gmail.com
I wonder, Lucas, what will you be publishing then? :)
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Database Workbench - developer tool for Oracle, MS SQL Server, PostgreSQL,
SQL Anywhere, MySQL, InterBase, NexusDB and Firebird.
-Original Message-
Am
Triggers don't
have
code.
Hope this helps.
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
On 07.11.2018 19:27, 'Martijn Tonies (Upscene Productions)'
m.ton...@upscene.com [firebird-support] wrote:
> Yes, it's true and it's rather annoying when, for example,
r stored procedure with wrong list of
>parameters, and it will give error only at the execution time?
I'll let you know.
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Regards,
Alexey
On 07.11.2018 19:27, 'Martijn Tonies (Upscene Productions)'
m.ton...@upscene.com [fi
Yes, it's true and it's rather annoying when, for example, developing an
interactive database development tool ;)
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Database Workbench - developer tool for Oracle, MS SQL Server, PostgreSQL,
SQL Anywhere, MySQL, InterBase,
Hi all,
Could this be related to:
https://blog.mertech.com/windows-10-version-1803-breaks-some-shared-folder-applications
"This means that applications started from these environments can’t open a
connection to a database server."
With regards,
Martijn Tonies
Upscene Productions
Hello Mark,
>>> m.ton...@upscene.com [firebird-support] wrote:
I wonder, how can applications use this feature
https://www.firebirdsql.org/file/documentation/release_notes/html/en/3_0/rnfb30-dml-planoutput.html
>>>
>>> What do you mean? How to parse it, or how to get it?
>>
>> How to
>On 23-2-2018 11:58, 'Martijn Tonies (Upscene Productions)'
>m.ton...@upscene.com [firebird-support] wrote:
>> I wonder, how can applications use this feature
>> https://www.firebirdsql.org/file/documentation/release_notes/html/en/3_0/rnfb30-dml-planoutput.html
>
>What d
: Re: [firebird-support] Firebird 3 advanced plan output > how to use
this with the API?
On 23-2-2018 11:58, 'Martijn Tonies (Upscene Productions)'
m.ton...@upscene.com [firebird-support] wrote:
> I wonder, how can applications use this feature
> https://www.firebirdsql.org/file/docu
Hi,
I wonder, how can applications use this feature
https://www.firebirdsql.org/file/documentation/release_notes/html/en/3_0/rnfb30-dml-planoutput.html
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Database Workbench - developer tool for Oracle, MS SQL Server,
Hi,
Remove the VALUES(( part
There’s no need for a VALUES keyword if you use a SELECT to insert rows.
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Database Workbench - developer tool for Oracle, MS SQL Server, PostgreSQL,
SQL Anywhere, MySQL, InterBase, NexusDB and
Hello Michał,
Firebird 3 uses the following syntax:
COMMENT ON IS 'value'
COMMENT ON COLUMN . IS 'value'
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Database Workbench - developer tool for Oracle, MS SQL Server, PostgreSQL,
SQL Anywhere, MySQL, InterBase, NexusDB
Hello Dmitry,
>28.03.2017 10:06, Martijn Tonies wrote:
>>
>> So the first 'fetch' operation on a position that's invalid returns
>> "rowcount=0",
>> any additional fetch (which includes a move) returns an exception?
>
>Yes. Moving cursor from "last" to EOF is perfectly valid, "no data"
Hello Dmitry,
So the first 'fetch' operation on a position that's invalid returns
"rowcount=0",
any additional fetch (which includes a move) returns an exception?
That seems to be the case.
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
-Original Message-
Hi all,
I’m unsure if this is an error or the intended behaviour.
Got a simply table “dummy_rows_10”, single column, integer values 1..10
Next, this procedure:
SET TERM ^^ ;
CREATE OR ALTER PROCEDURE DEBUG_CURSOR_TESTS returns (
P_OUT1 TYPE OF COLUMN DUMMY_ROWS_10.V,
RC Integer)
AS
Hello Aldo,
Generators are NOT influenced by transactions, so yes, that is correct.
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Database Workbench - developer tool for Oracle, MS SQL Server, PostgreSQL,
SQL Anywhere, MySQL, InterBase, NexusDB and Firebird.
Hello Dimitry,
>05.01.2017 12:17, 'Martijn Tonies (Upscene Productions)'
>m.ton...@upscene.com
>[firebird-support] wrote:
>> Any idea what this error code means?
>
> "Default values for parameters are allowed only in declaration of
> packaged function @1.@2"
Hi all,
Any idea what this error code means?
RECREATE PACKAGE BODY PCK_TEST failed
unknown ISC error 336068898
while executing:
RECREATE PACKAGE BODY PCK_TEST AS
begin
... code
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Database Workbench - developer tool for
Hello Nico,
>I want to create a tablename in camelcase without using quotes.
>
>If I execute Create table MyTable(aField integer) then the tablename is
>saved as MYTABLE. And yes then you can use camelcase >without quotes.
>
>Can you find a solution ?
The only solution to preserving case, is to
Hello Nico,
If you want the case preserved, you have to use double quotes, always.
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Database Workbench - developer tool for Oracle, MS SQL Server, PostgreSQL,
SQL Anywhere, MySQL, InterBase, NexusDB and Firebird.
We want
Hello Dmitry,
When connected to the database from another application, here:
C:\Program Files\Firebird\Firebird_3_0>gbak -b -m -t -v
-user sysdba -pas masterkey
"e:\temp\2014 FB Conference.fdb" "e:\temp\2014 FB Conference.bak"
>>>
>>> Hostless connection string, as I
>22.06.2016 12:14, 'Martijn Tonies (Upscene Productions)'
>m.ton...@upscene.com
>[firebird-support] wrote:
>> When connected to the database from another application, here:
>> C:\Program Files\Firebird\Firebird_3_0>gbak -b -m -t -v
>> -user sysdba -pas
Hello Dmitry,
>> As per original example:
>> Here’s the command:
>> C:\Program Files\Firebird\Firebird_3_0>gbak -b -m -t -se service_mgr –v
>> -user sysdba -pas masterkey
>>"MARTIJN-WS-DEV/3054:e:\temp\2014 FB Conference.fdb"
>>"e:\temp\2014 FB Conference.bak"
>>
>> In my book, this
>And no, I couldn't find this in the documentation.
FYI:
http://firebirdsql.org/manual/gbak-cmdline.html#gbak-cmdline-backup
"-SE[RVICE]
This switch causes gbak to backup a remote database via the service manager.
This causes the backup file to be created on the remote server, so the path
Hi all,
I’m trying to back up a database using gbak and the –se switch. But can’t seem
to get it working.
Here’s the command:
C:\Program Files\Firebird\Firebird_3_0>gbak -b -m -t -se service_mgr –v
-user sysdba -pas masterkey
"MARTIJN-WS-DEV/3054:e:\temp\2014 FB Conference.fdb"
Hello Gabor,
>>> First question: why do you have an UPDATE in a BEFORE UPDATE
>> trigger on ?
>>
>>The table have many fields and a UNIQUE constraint with four fields, one
>>the ISDEFAULT from it (only one default accepted for groups of rows
>>depend on the other three fields (which included
Hello Gabor,
>> Hi,
>>
>> First question: why do you have an UPDATE in a BEFORE UPDATE
>> trigger on ?
>
>The table have many fields and a UNIQUE constraint with four fields, one
>the ISDEFAULT from it (only one default accepted for groups of rows
>depend on the other three fields (which
Hi,
First question: why do you have an UPDATE in a BEFORE UPDATE
trigger on ?
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
Hi All,
I have a BEFORE
Hello Mike,
Database Workbench won't enable the Commit/Rollback buttons on a plain
SELECT,
because this will require you to use them for every SELECT you perform.
In the case of a SELECT-able Stored Procedure, this means it won't be able
to detect
your procedure is also modifying data.
In the
Hi,
Easiest is as follows:
define your sequence trigger to be:
IF (coalesce(new.idcolumn, 0) = 0)
then new.idcolumn = gen_id(mysequence, 1);
Then, in your trigger:
declare myassid bigint;
begin
myassid = gen_id(mysequence, 1);
insert into assignment(assid, ... other columns ... )
>> I need to rebuild some records in my database. I have to choices:
>>
>> 1. Firstly I delete set of records and then insert new ones.
>> 2. I update the existing ones.
>>
>> What solution is preferable? Will scenerio number 1. cause more garbage
>in
>> database and decrease its performance?
>
Hello Dmitry,
>> This works:
>>
>> CREATE TABLE BMP_BLOBS
>> (
>>ID INTEGER NOT NULL,
>>BMP BLOB SUB_TYPE 0 SEGMENT SIZE 80,
>>"COMMENT" VARCHAR(20) COLLATE ISO8859_1,
>> CONSTRAINT PK_BMP_BLOBS PRIMARY KEY (ID)
>> );
>>
Hello Lester,
>m.ton...@upscene.com [firebird-support] wrote:
>> Nevertheless, the parameter is BLOB. Why is one blob conversion
>> supported,
>> but an other, that looks the same to the user, fails?
>
>Martijn ... I always thought that the 'blob' in a function had to be an
>existing blob
Hello Dmitry,
>> I wonder, should this be possible:
>> select f_blobsize(X'10')
>> from rdb$database
>> DECLARE EXTERNAL FUNCTION F_BLOBSIZE
>> BLOB
>> RETURNS INTEGER FREE_IT
>> ENTRY_POINT 'blobsize' MODULE_NAME 'FreeAdhocUDF';
>> I’m getting this error:
>> “ feature is not
Hi all,
I wonder, should this be possible:
select f_blobsize(X'10')
from rdb$database
DECLARE EXTERNAL FUNCTION F_BLOBSIZE
BLOB
RETURNS INTEGER FREE_IT
ENTRY_POINT 'blobsize' MODULE_NAME 'FreeAdhocUDF';
I’m getting this error:
“ feature is not supported BLOB and array data types are
Hello Vishal,
Is there any tool available which would show the relationship/linking
between tables for Firebird database ?
Our Database Workbench tool does that.
http://www.upscene.com/documentation/dbw5/dia_pdm_reverse_engineering.htm
With regards,
Martijn Tonies
Upscene Productions
Hi,
With the following plan:
PLAN SORT (JOIN (T T TL INDEX (TICKETLABELSTICKETTID)) PLAN (T T L NATURAL), L
INDEX (TICKETLABELID))
Is the second PLAN expression is nested stream in the first SORT?
eg:
PLAN SORT (
JOIN (
T T TL INDEX (TICKETLABELSTICKETTID)
)
PLAN (
Hello Tim,
Firebird constraints are evaluated immediately for the transaction.
So that means that during constraint validation, it doesn't see other
transactions, and due to it's immediate evaluation, you can't temporarily
ignore validation for your transaction either. (eg: increase all PK
Hello Andrew,
Welcome to the Firebird community.
I can pump SQL statements through the application to make certain changes the
first time a new release is run (alter table etc) but am concerned at how I am
supposed to update SPs (potentially a large number) without access to the FB
server. I
Hi,
Text values go inside single quotes:
WHERE mycol = ‘value’
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
I am having trouble writing a query in
Hi,
Looks like ISQL is right and EMS SQL Manager is wrong.
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
From: mailto:firebird-support@yahoogroups.com
Hi,
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
Hi Craig,
I have been using LoadFromFile in my Delphi apps to load a pdf file into
my Firebird databases. However, I need to replicate this using an update
query.
The code below was my first attempt. Using IBOjects within Delphi
qryUpdateManifestBLOB.SQL.Clear;
Hello Dmitry,
btw, in Firebird 3, the RDB$EXCEPTIONS.RDB$MESSAGE is still NONE.
Would it make sense to encode the message according to the given
connection
character set?
Do you mean changing RDB$EXCEPTIONS.RDB$MESSAGE to UTF8? It was
discussed but ended nowhere.
No, I meant a runtime
Hello Dmitry,
I'm still puzzled.
29.01.2015 19:15, Martijn Tonies wrote:
2) Create SP with EXCEPTION ERROR 'some Cyrillic string';
Done. In the source, I see the following:
begin
exception test _utf8
X'31D0A2D095D0A1D0A220D09DD09020D091D0AAD09BD093D090D0A0D0A1D09AD098';
end
You
btw, in Firebird 3, the RDB$EXCEPTIONS.RDB$MESSAGE is still NONE.
Would it make sense to encode the message according to the given connection
character set?
Now, I tried the following in the procedure to work around the above:
exception test _utf8 'unicode string here';
Any idea why this
btw, in Firebird 3, the RDB$EXCEPTIONS.RDB$MESSAGE is still NONE.
Oh bugger.
Now, I tried the following in the procedure to work around the above:
exception test _utf8 'unicode string here';
When I look at RDB$PROCEDURES.RDB$PROCEDURE_SOURCE I can see
the text is inserted as a hex
Oh bugger.
Now, I tried the following in the procedure to work around the above:
exception test _utf8 'unicode string here';
When I look at RDB$PROCEDURES.RDB$PROCEDURE_SOURCE I can see
the text is inserted as a hex string.
But this doesn't seem to work either?
Does this work at all
Hi all,
I have an EXCEPTION object with a Unicode text in it, a stored procedure raises
this exception.
The client application can view the Unicode text just fine when it retrieves
the Exception meta data, but when the exception is raised, Firebird doesn’t
seem to translate the text.
Any
I have an EXCEPTION object with a Unicode text in it, a stored procedure
raises this exception.
The client application can view the Unicode text just fine when it
retrieves the Exception meta data, but when the exception is raised,
Firebird doesn’t seem to translate the text.
Any idea how to
Hello Christoph,
Database Workbench supports some of the new features in Firebird 3 – for
example, the packages.
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and
Hello Dmitry,
12.12.2014 23:08, 'Martijn Tonies wrote:
But using ROWS instead of FIRST makes using a parameter possible
FIRST (:CNT) does the trick as well.
Oh, good one, let's see if I can remember. ;)
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download
Hi,
First thing: SUSPEND is only used if the “caller” will ask for multiple rows,
returning rows to the client or a caller-stored procedure. In your IN clause,
this doesn’t make any sense, as an IN clause isn’t “looping over result”.
Next, an IN clause requires a list of values or a SELECT
Hello Lane,
I've got a V2.5 DB, and using DB Workbench.
Good. ;)
Based on a hint from the Firebird Book, I tried the following query, hoping
to get a Session_ID:
'select rdb$get_context('system', 'session_id') from rdb$database;'
I got back a Dynamic SQL error -804 Function unknown
Hello Dixon,
Is this using the ROWS on your UPDATE or on your SELECT?
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
From:
, December 12, 2014 10:10 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] RDB$GET_CONTEXT()
On 12/12/2014 12:23 PM, 'Martijn Tonies (Upscene Productions)'
m.ton...@upscene.com [firebird-support] wrote:
Hello Lane,
I've got a V2.5 DB, and using DB Workbench
Create a backup with Firebird 1.5, restore it with 2.5.
Make sure to keep a copy.
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
From:
select count(case_number) as counted, case_number
from ACCT_CASE_COURT
group by case_number
?
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
From:
Hello Mike,
select
count(CASE_NUMBER), CASE_NUMBER
from
ACCT_CASE_COURT
group by CASE_NUMBER
having count(CASE_NUMBER) 1
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase,
Good morning SET. ;)
I thought of the concatenation trick, but found it ugly as a solution, your
second query
is cleaner, I think.
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL,
Hello Mike,
In the second query, you’re counting records and then do the DISTINCT, so the
result is 32, and if you “distinct” that result, there’s only 1 record, with a
value
of 32.
What you seem to want, is to COUNT(DISTINCT(...))
With regards,
Martijn Tonies
Upscene Productions
Hello Mike,
Just happening to be testing this in Database Workbench. Have used this
product for years and just love it.
Thank you, that’s good to hear.
Thanks for you reply.
So my second SQL should have been as follows? It results in an error Dynamic
SQL Error SQL error code = -104 Token
Hello Mike,
So you want to count records in DEBT for a specific CLT_ID.
Now, in the DEBT table, there are records for multiple PERSONs, but what about
ACCT_ID,
CASE_ID and DEBT_NO, which of these or what combination are unique with regard
to each
ACCT_CASE?
If none, you would need a derived
Hello Mike,
No doubt our favorite SQL wizard from Norway, SET, will join in, perhaps he has
an idea.
As for my answer with the VIEW, now that I think of it, you would need the date
and status columns as well, so the DISTINCT is different. Darn.
You could use a SELECT-able Stored Procedure,
Hi all,
I noticed that with Classic 2.5, you can get “object in use” when trying to
modify a
stored procedure that’s been previously executed, see also:
http://tracker.firebirdsql.org/browse/CORE-4016
When using “wait” on the transaction to save the procedure, instead of
“nowait”,
the
Hi all,
I’ve got this following problem and example:
SET TERM ^^ ;
create PROCEDURE DEBUG_TEST
returns (
C BLOB SUB_TYPE 0,
M2 Numeric(18,0),
I2 VarChar(10))
AS
declare variable i varchar(4) = X'4131';
declare variable m numeric(18) = 0x2121;
declare variable b blob;
begin
c = 0x40;
m2
Wouldn’t leaving out the “temp trigger” and “foo” and simply doing:
update sometable set id = gen_id(some_table_id_gen, 1);
have the same result?
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere,
I think this needs a
GROUP BY a.Project_PK
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
From: mailto:firebird-support@yahoogroups.com
Sent: Tuesday,
It did, but my fingers were quicker.
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
From: mailto:firebird-support@yahoogroups.com
Sent: Tuesday,
Hello Patrick,
Yes, that is correct, meta data changes need to be committed as well.
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
From:
Hello Alan,
The domain check constraint is available, however, it is a custom
written check constraint, like for example:
CREATE DOMAIN ...
CHECK (
VALUE IN ('Y', 'N')
)
This source can be found in the system tables, table RDB$FIELDS
column RDB$VALIDATION_SOURCE
With regards,
Martijn Tonies
Hello Wolfgang,
ALTER TABLE tablename DROP CONSTRAINT INTEG_485
That should do the trick.
Or find the constraint and simply click Drop in Database Workbench. ;)
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server,
Hello Maxi,
Check constraints are table based, not column based.
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
From:
73 matches
Mail list logo