Re: [firebird-support] Create view on external table

2020-01-06 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] Off-Topic: Firebird future

2019-10-22 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] Firebird vs. PostgreSQL

2018-11-08 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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,

Re: [firebird-support] Firebird vs. PostgreSQL

2018-11-07 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] Firebird vs. PostgreSQL

2018-11-07 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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,

Re: [firebird-support] Firebird and Windows 10 update

2018-05-16 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] Firebird 3 advanced plan output > how to use this with the API?

2018-02-28 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] Firebird 3 advanced plan output > how to use this with the API?

2018-02-28 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
>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?

2018-02-23 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
: 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

[firebird-support] Firebird 3 advanced plan output > how to use this with the API?

2018-02-23 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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,

Re: [firebird-support] Insert error: count of column and variable list do not match

2017-12-29 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] FB 3 add description to table/ column

2017-04-03 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] Re: Cursor FETCH in PSQL and ROW_COUNT/'fetch past last record' error

2017-03-29 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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"

Re: [firebird-support] Re: Cursor FETCH in PSQL and ROW_COUNT/'fetch past last record' error

2017-03-28 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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-

[firebird-support] Cursor FETCH in PSQL and ROW_COUNT/'fetch past last record' error

2017-03-27 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] Read only transaccions and generators

2017-03-14 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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.

Re: [firebird-support] Fb 3: error code 336068898 when recreating package

2017-01-05 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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"

[firebird-support] Fb 3: error code 336068898 when recreating package

2017-01-05 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] info

2017-01-05 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] info

2017-01-04 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] Re: gbak with -se switch?

2016-06-22 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] Re: gbak with -se switch?

2016-06-22 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
>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

Re: [firebird-support] Re: gbak with -se switch?

2016-06-22 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] Re: gbak with -se switch?

2016-06-22 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
>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

[firebird-support] gbak with -se switch?

2016-06-22 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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"

Re: [firebird-support] How to skip a trigger in the same trigger?

2016-04-14 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] How to skip a trigger in the same trigger?

2016-04-14 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] How to skip a trigger in the same trigger?

2016-04-14 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] Why can't I have a SUSPEND or UPDATE in the same Stored Procedure?

2015-11-03 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] storing a sequence value in a trigger

2015-10-06 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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 ... )

Re: [firebird-support] What is better: UPDATE or DELETE + INSERT?

2015-09-16 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
>> 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? >

Re: [firebird-support] Re: Hex string literal, blob not supported for conversion?

2015-08-31 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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) >> ); >>

Re: [firebird-support] Re: Hex string literal, blob not supported for conversion?

2015-08-31 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] Re: Hex string literal, blob not supported for conversion?

2015-08-31 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

[firebird-support] Hex string literal, blob not supported for conversion?

2015-08-31 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] Table Relationship Tools

2015-04-15 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

[firebird-support] Plan question, what is a stream and what isn't?

2015-04-14 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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 (

Re: [firebird-support] Scope of uniqueness constraint?

2015-04-01 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] Distributing/deploying Stored Procedures

2015-03-12 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] Trouble with a Firebird query

2015-03-09 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] Charset in ISQL: How to show special characters

2015-02-19 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: AW: [firebird-support] Charset in ISQL: How to show special characters

2015-02-19 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] How do load a BLOB file using an Update query

2015-02-11 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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;

Re: [firebird-support] Re: Unicode text in Exception?

2015-01-29 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] Re: Unicode text in Exception?

2015-01-29 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] Re: Unicode text in Exception?

2015-01-27 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] Re: Unicode text in Exception?

2015-01-22 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] Re: Unicode text in Exception?

2015-01-21 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

[firebird-support] Unicode text in Exception?

2015-01-21 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] Re: Unicode text in Exception?

2015-01-21 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] Firebird 3.0 Development Admin Tools

2015-01-15 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] Re: How do you write dynamic sql in Firebird

2014-12-15 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] How do you write dynamic sql in Firebird

2014-12-12 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] RDB$GET_CONTEXT()

2014-12-12 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] How do you write dynamic sql in Firebird

2014-12-12 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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:

Re: [firebird-support] RDB$GET_CONTEXT()

2014-12-12 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
, 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

Re: [firebird-support] Migration from Firebird 32 1.5.6 to Firebird 64 2.5.3

2014-10-29 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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:

Re: [firebird-support] How do I count the number of duplicate rows in a table?

2014-10-28 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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:

Re: [firebird-support] How do I count the number of duplicate rows in a table?

2014-10-28 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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,

Re: [firebird-support] How do I return an accurate COUNT(*) when a JOIN is involved?

2014-10-14 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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,

Re: [firebird-support] How do I return an accurate COUNT(*) when a JOIN is involved?

2014-10-13 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] How do I return an accurate COUNT(*) when a JOIN is involved?

2014-10-13 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] How do I return an accurate COUNT(*) when a JOIN is involved?

2014-10-13 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] How do I return an accurate COUNT(*) when a JOIN is involved?

2014-10-13 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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,

[firebird-support] wait vs nowait on meta data statements

2014-10-02 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

[firebird-support] Setting blob values to a binary hex literal returns strange results (PSQL)

2014-09-25 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] Re: How to populate a new table column with a INTEGER sequence?

2014-09-22 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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,

Re: [firebird-support] Re: SubQuery Help

2014-09-16 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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,

Re: [firebird-support] Re: SubQuery Help

2014-09-16 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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,

Re: [firebird-support] DROP CONSTRAINT only shows effect after commit?

2014-08-28 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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:

Re: [firebird-support] Extracting check values from domain

2014-08-08 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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

Re: [firebird-support] remove constraint

2014-07-07 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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,

Re: [firebird-support] Get check constraints info

2014-06-05 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
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: