[firebird-support] Three trailing spaces?

2014-12-12 Thread Tim Ward t...@telensa.com [firebird-support]
I've got a column defined as MODACTION D_MODACTION , where the domain is defined as CREATE DOMAIN D_MODACTION AS CHAR(1) CHARACTER SET ASCII NOT NULL CHECK (VALUE IN ( 'A', 'U', 'D', 'M', 'S' )) COLLATE ASCII; I've got a record which appears to have 'A' in this field.

Re: [firebird-support] Three trailing spaces?

2014-12-12 Thread Nick Upson n...@telensa.com [firebird-support]
if you use isql or dbworkbench to do the same query, that will tell you if the problem is php or firebird​ Nick Upson, Telensa Ltd, Senior Operations Network Engineer direct +44 (0) 1799 533252, support hotline +44 (0) 1799 399200 On 12 December 2014 at 13:55, Tim Ward t...@telensa.com

[firebird-support] group by date

2014-12-12 Thread 'checkmail' check_m...@satron.de [firebird-support]
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

Re: [firebird-support] group by date

2014-12-12 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On Fri, 12 Dec 2014 15:15:40 +0100, 'checkmail' check_m...@satron.de [firebird-support] firebird-support@yahoogroups.com wrote: 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(*)

Re: [firebird-support] Three trailing spaces?

2014-12-12 Thread Tim Ward t...@telensa.com [firebird-support]
On 12/12/2014 14:15, Mark Rotteveel m...@lawinegevaar.nl [firebird-support] wrote: What is the default character set of your database (if I had to guess it is UTF8), and what is your connection character set (if I had to guess it's NONE or not specified)? Database charset is UTF8.

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

2014-12-12 Thread dixonepper...@yahoo.com [firebird-support]
I'm trying to write a procedure where the number you select is a parameter. This is what I've come up with, but it doesn't work. SET TERM ^ ; CREATE PROCEDURE uspInitCampaignMaxCnt ( CampaignName Varchar(75) , BatchNum INT , Cnt INT ) RETURNS ( CntBatch INT ) AS DECLARE

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

[firebird-support] RDB$GET_CONTEXT()

2014-12-12 Thread lcampbell lcampb...@nwsoftware.com [firebird-support]
I've got a V2.5 DB, and using DB Workbench. 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 RDB$GET_CONTEXT message. What am

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 dixonepper...@yahoo.com [firebird-support]
Martijn, Thanks, ROWS worked perfect I changed it to this and am getting what I want. UPDATE tblCampaign a SET a.BATCHNUM = :BatchNum WHERE a.CAMPAIGNID IN (SELECT c.CAMPAIGNID FROM tblCampaign c WHERE

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] How do you write dynamic sql in Firebird

2014-12-12 Thread 'E. D. Epperson Jr' dixonepper...@gmail.com [firebird-support]
I'm using it on the update. When I used it on the Select, it did the update to all the rows. Dixon On Fri, Dec 12, 2014 at 3:35 PM, 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support] firebird-support@yahoogroups.com wrote: Hello Dixon, Is this using the ROWS on

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

2014-12-12 Thread lcampbell lcampb...@nwsoftware.com [firebird-support]
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. Good. ;) Based on a hint from the Firebird Book, I tried the following query, hoping to get a Session_ID: 'select

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

2014-12-12 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
Hello Lane, In Database Workbench 5, I’ve an empty list as well (Firebird 3), even though the function can be used, system table RDB$FUNCTIONS no longer includes these system functions. On your database, I’ll take it rdb$functions is empty as well. I’m unsure why this should happen, is this

[firebird-support] Two Jars one connection pool

2014-12-12 Thread Łukasz Bączek bacze...@o2.pl [firebird-support]
Hello, I have two separate library jar that will connect to the database using the connection pool. But how do these two libraries to connect to a single connection pool. RG, Łukasz

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

2014-12-12 Thread Geoff Worboys ge...@telesiscomputing.com.au [firebird-support]
lcampbell lcampb...@nwsoftware.com [firebird-support] wrote: Actually, there's nothing in the UDFs section of my DBWorkbench... on any of my DBs. Is there something missing from my installation? Check the ODS version of the databases - it should be 11.2 for FB v2.5 databases. (Might you