Re: [firebird-support] Re: On Updating One Column Value, Update Time Stamp in Another Column

2017-08-09 Thread Paul Vinkenoog p...@vinkenoog.nl [firebird-support]
very useful: http://www.firebirdfaq.org/ And Helen Borrie's Firebird Book is a great manual which also includes chapter(s) on SP's, triggers and PSQL. It's not free though! You'll find it here: https://www.ibphoenix.com/ (You may need to scroll down a bit.) Hope this helps! Cheers, Paul Vinkenoog

Re: [firebird-support] Re: On Updating One Column Value, Update Time Stamp in Another Column

2017-08-09 Thread Paul Vinkenoog p...@vinkenoog.nl [firebird-support]
t; Dynamic SQL Error > SQL error code = -104 > Token unknown - line 1, column 23 > update My fault! If forgot the trigger name. It should be: create trigger MyTrigger before update on Table_Name ... Instead of MyTrigger, you choose a more meaningful name of course. Cheers, Paul Vinkenoog

Re: [firebird-support] Re: On Updating One Column Value, Update Time Stamp in Another Column

2017-08-09 Thread Paul Vinkenoog p...@vinkenoog.nl [firebird-support]
begin if (new.col3 is distinct from old.col3) then new.col5 = current_timestamp; end# set term ;# If col3 is non-nullable you can simply use "new.col3 <> old.col3" in the test. Mind you, an explicit update that re-enters the existing value in col3 won't cause col5 to be updated! HTH, Paul Vinkenoog

Re: [firebird-support] Case and Accent insensitive compares

2016-06-16 Thread Paul Vinkenoog p...@vinkenoog.nl [firebird-support]
ord where this would be the case. So when it's strictly about German, AI collations seem useless, except for catching certain foreign words and names likes Gérard/Gerard, or misspellings of Kekulé. Cheers, Paul Vinkenoog

Re: [firebird-support] Case and Accent insensitive compares

2016-06-15 Thread Paul Vinkenoog p...@vinkenoog.nl [firebird-support]
ae sind gleich ö und oe sind gleich ü und ue sind gleich ß und ss sind gleich If you do want to treat them as different letters, you need a German collation that does just that. However, this collation will not work correctly with words in some other languages containing ä, ö and ü. Cheers, Paul Vinkenoog

Re: [firebird-support] NBackup Levels

2014-05-06 Thread Paul Vinkenoog
, it's highly unlikely that someone would need more than 3-5 levels. HTH, Paul Vinkenoog

Re: [firebird-support] Select Distinct Column Pairs

2014-03-30 Thread Paul Vinkenoog
select distinct , from HTH, Paul Vinkenoog

Re: [firebird-support] Re: nbackup strategy advice

2014-03-16 Thread Paul Vinkenoog
he 'wrong' day of the week. But the daily backups can start the next day, *unless* there are also hourly backups scheduled (N=4). I also realize now that I automatically assumed that nothing happens during weekends, but of course that depends entirely on the situation. Kind regards, Paul Vinkenoog

Re: [firebird-support] Re: nbackup strategy advice

2014-03-16 Thread Paul Vinkenoog
d 2 files if it is the first day of the month.) All you have to do is determine the most recent backup before the chosen point in time. If that is a level N, you need N+1 files for the restore (levels 0-N, each one being the most recent file of that level before time 'T'). Cheers, Paul Vinkenoog

Re: [firebird-support] nbackup strategy advice

2014-03-15 Thread Paul Vinkenoog
lls nbackup within a loop, each time with a different database name. Hope this helps, Paul Vinkenoog

Re: [firebird-support] Basic sql alter table commands

2014-02-22 Thread Paul Vinkenoog
ent and Function Reference :: ALTER TABLE". That's the basis. The document Thomas pointed you to contains the updates since Firebird was forked from the IB sources. Good luck, Paul Vinkenoog

Re: [firebird-support] OT: Vote for Firebird as Database of the Year 2013 at LinuxQuestions

2014-02-05 Thread Paul Vinkenoog
we used to have more momentum in the past, but maybe that's just me: back then I had much more time, so I contributed more to Firebird, followed all the newsgroups, etc. Cheers, Paul Vinkenoog

Re: [firebird-support] Confused about delta files [SOLVED]

2014-01-20 Thread Paul Vinkenoog
You're right; in Firebird 2.0 and up you can do a full shutdown, if necessary in combination with -force. Paul Vinkenoog

Re: [firebird-support] Confused about delta files [SOLVED]

2014-01-17 Thread Paul Vinkenoog
is a bad idea anyway, and the proper solution would be to > always use gbak? If in any doubt, use gbak. But as you can tell from Sean's post, there are situations where a straight file copy/move is just as safe. Just make sure you know what you are doing. Cheers, Paul Vinkenoog

Re: [firebird-support] Confused about delta files [SOLVED]

2014-01-17 Thread Paul Vinkenoog
uld not advocate this. Once people are more knowledgeable, they can decide for themselves what is safe and when. Cheers, Paul Vinkenoog

Re: [firebird-support] Confused about delta files [SOLVED]

2014-01-17 Thread Paul Vinkenoog
t; I think maybe it would be a good idea to put this into the vendor's dox as > well. You mean the FishBowl docs? Or the Firebird docs? BTW, this nbackup scheme you used: did it come with Fishbowl or did you set it up yourself? Paul Vinkenoog

Re: [firebird-support] Confused about delta files [SOLVED]

2014-01-17 Thread Paul Vinkenoog
mbedded connections exist), but the standard mantra is "use gbak", simply because this is *always* safe. Paul Vinkenoog

Re: [firebird-support] Confused about delta files [SOLVED]

2014-01-16 Thread Paul Vinkenoog
copied without risk - but the delta is live, so it shouldn't be touched unless there's absolutely no other option. In the situation you described, the logical thing to do would have been ALTER DATABASE END BACKUP (or nbackup -N) on the original machine (once you found out the right credentials, which I believe you did). Cheers, Paul Vinkenoog

Re: [firebird-support] Multiple Embedded Connections

2014-01-16 Thread Paul Vinkenoog
gt; time. > > Consult the Firebird 2.5 Release Notes for full details." > > Yes - but where is this global lock table? It doesn't tell me if it's a file > somewhere or in the memory of the first server loaded? Iirc, it's a lock file in ProgramData\Firebird. Paul Vinkenoog

Re: [firebird-support] Multiple Embedded Connections

2014-01-16 Thread Paul Vinkenoog
atabase can be accessed by one or more Embedded servers and a regular Classic or SuperClassic server at the same time. Consult the Firebird 2.5 Release Notes for full details." Cheers, Paul Vinkenoog

Re: [firebird-support] Confused about delta files [SOLVED]

2014-01-16 Thread Paul Vinkenoog
-SUPPORT for a reason.) > Is there a method for me to do the documentation change? I'm pretty good at > that sort of thing. If you want to propose changes to a manual, the preferred way is to submit them to the firebird-docs list (to subscribe, mail to firebird-docs-requ...@lists.sourceforge.net) People who write or update documentation regularly can get CVS access. Kind regards, Paul Vinkenoog

Re: [firebird-support] nbackup questions

2014-01-15 Thread Paul Vinkenoog
tecture, straight file copies may not work on the target machine. If they have different endianness, straight file copies are *guaranteed* not to work. Cheers, Paul Vinkenoog

Re: [firebird-support] nbackup questions

2014-01-15 Thread Paul Vinkenoog
your case, I assume that the Fishbowl software has generated a secure SYSDBA password. Kind regards, Paul Vinkenoog

Re: [firebird-support] RE: nbackup questions

2014-01-15 Thread Paul Vinkenoog
delta is today." ...combined with his later statement that "the system's Scheduler function, without any warning or errors, stopped making these nbackups last May". Cheers, Paul Vinkenoog

Re: [firebird-support] nbackup questions

2014-01-15 Thread Paul Vinkenoog
And if you can't access those scripts, who can? Kind regards, Paul Vinkenoog

Re: [firebird-support] Help with a query

2013-12-20 Thread Paul Vinkenoog
orphans with select from TableB b where not exists (select * from TableA a where a. = b.) Kind regards, Paul Vinkenoog ++ Visit http://www.firebirdsql.org and click the Resources item o

Re: [firebird-support] Return PK Value

2013-08-23 Thread Paul Vinkenoog
with singleton SELECT inserts. Paul Vinkenoog

Re: [firebird-support] Primary Key x Unique Key

2013-07-25 Thread Paul Vinkenoog
-table.html#langrefupd25-ct-unique-keys Cheers, Paul Vinkenoog

Re: [firebird-support] Primary Key x Unique Key

2013-07-25 Thread Paul Vinkenoog
e either the PRIMARY KEY or UNIQUE. Kind regards, Paul Vinkenoog

Re: [firebird-support] Number list without table

2013-07-25 Thread Paul Vinkenoog
age that, once written, you can call it from any number of places in your code. The executable block would have to be copied over and over again (or included in a programming language function/procedure/macro). Paul Vinkenoog

Re: [firebird-support] Number list without table

2013-07-25 Thread Paul Vinkenoog
lectable stored procedure to achieve that, with the number of rows as a parameter. Or use EXECUTE BLOCK. Cheers, Paul Vinkenoog

Re: AW: [firebird-support] NOT in Firebird

2013-07-04 Thread Paul Vinkenoog
Olaf wrote: > great, exactly what I was looking for. Only 1 and 0 is possible. Then you can also do Var2 = 1 - Var1 The outcome is the same, but perhaps this is more obvious than bitwise XORing with 1. And it might execute a wee little faster. Cheers, Paul Vinkenoog

Re: [firebird-support] Script with 'Drop' in it

2013-02-07 Thread Paul Vinkenoog
ke DROP INDEX, DROP EXTERNAL FUNCTION, > etc. in a script without generating an error of the object isn't found? In a pure SQL script, I wouldn't know. But your application could check if the UDF name exists in RDB$FUNCTIONS and if so, execute DROP EXTERNAL FUNCTION. Cheers, Paul Vinkenoog

Re: [firebird-support] RDB$ADMIN and Role Revocation

2013-02-07 Thread Paul Vinkenoog
but otherwise equal privileges now without finding out the grantors first, it has to be done with a searched delete statement on RDB$USER_PRIVILEGES. Which is a hack of course, like any direct manipulation of metadata. It would be better if this were possible in SQL, e.g. by implementing CASCADE for REVOKE statements (like PostgreSQL has done). Cheers, Paul Vinkenoog

Re: [firebird-support] RDB$ADMIN and Role Revocation

2013-02-07 Thread Paul Vinkenoog
user could revoke > any role. > > Firebird 2.5.2 - this is not the case. I get an exception > > > > unsuccessful metadata update SYSDBA is not grantor of Role on MANAGER to > 0S0ASDFASDF. You have to use GRANTED BY here: revoke manager from 0S0ASDFASDF granted by rdb$admin Paul Vinkenoog

Re: [firebird-support] Re: server version

2013-02-04 Thread Paul Vinkenoog
veel posted a solution in Firebird-Java. Cheers, Paul Vinkenoog

Re: [firebird-support] Re: INSERT ... RETURNING and updatable view

2013-02-04 Thread Paul Vinkenoog
27;ll put that in the tracker for the doc subproject. Paul Vinkenoog

Re: [firebird-support] Re: server version

2013-02-03 Thread Paul Vinkenoog
x27;t matter to you - but the OP wanted a solution that didn't require opening a database connection first (and as we now know, he needs it for JDBC). Cheers, Paul Vinkenoog

Re: [firebird-support] server version

2013-02-02 Thread Paul Vinkenoog
bird 2.1 or higher on the client machine. Hope this helps, Paul Vinkenoog

Re: [firebird-support] INSERT ... RETURNING and updatable view

2013-02-02 Thread Paul Vinkenoog
nto T values (new.ID) returning T.id into :new.id; That would solve the whole problem (he said without having tested it). > > SQL> select * from V; > > ID > >1 >2 This is correct. Cheers, Paul Vinkenoog

Re: [firebird-support] I need help-Syntax error - ;

2012-08-20 Thread Paul Vinkenoog
t row of output parameters. But as said before, you haven't declared any. Not sure if this is all that's wrong, but it's a start! ;-) HTH, Paul Vinkenoog

Re: [firebird-support] Multiple rows in a EXECUTE PROCEDURE

2012-08-18 Thread Paul Vinkenoog
the SQL > Manager. However just one row with ISQL or a program. > > EXECUTE PROCEDURE TEST; > > With ISQL or with a program the prior line show me just one row. > > Why that? And how can I get all the rows? Since this is a selectable stored procedure, you should retrieve its output (a dataset) like this: select identi, name from test HTH, Paul Vinkenoog

Re: [firebird-support] Re: expression evaluation not supported

2012-08-18 Thread Paul Vinkenoog
ld be current_timestamp - as in your corrected example. http://www.firebirdsql.org/file/documentation/reference_manuals/reference_material/html/langrefupd25-intfunc-datediff.html Cheers, Paul Vinkenoog

Re: [firebird-support] Generators, what could cause resetting generator values to some earlier version

2012-08-11 Thread Paul Vinkenoog
tation/reference_manuals/user_manuals/html/generatorguide-basics.html#generatorguide-basics-maxval http://www.firebirdsql.org/file/documentation/reference_manuals/user_manuals/html/generatorguide-basics.html#generatorguide-basics-howmany Cheers, Paul Vinkenoog

Re: [firebird-support] Help required

2012-08-01 Thread Paul Vinkenoog
need a BLOB in Firebird, whereas MySQL supports (var)chars up to 64K. Cheers, Paul Vinkenoog

Re: [firebird-support] Perl, Firebird, and empty Where clause

2012-07-19 Thread Paul Vinkenoog
If you want the whole table, leave out the WHERE clause and if that isn't possible, use a tautology, e.g. "...where 1=1" (or append " or 1=1" to the existing clause). Good luck, Paul Vinkenoog

Re: [firebird-support] Re: Reference manual in on place

2012-07-13 Thread Paul Vinkenoog
e. Kind regards, Paul Vinkenoog Firebird Documentation Team

Re: [firebird-support] Re: How to insert only if a matching row does not exist?

2011-10-20 Thread Paul Vinkenoog
Hi Ed, > > merge > > into emp > > using (select 'mango' fruits from rdb$database) src > > on emp.fruits = src.fruits > > when not matched then insert (fruits) values ('mango') > > Nice trick! That seems to work. Just realized you can make it even easier: merge into emp

Re: [firebird-support] Re: How to insert only if a matching row does not exist?

2011-10-20 Thread Paul Vinkenoog
merge into emp using temp on emp.fruits = temp.fruits when not matched then insert (fruits) values (temp.fruits) Cheers, Paul Vinkenoog

Re: [firebird-support] Table alias with AS in SELECT statement supported?

2011-10-18 Thread Paul Vinkenoog
ef needs updating ;-) Frankly, I never noticed that the optional [AS] for table aliases was missing from the IB6 docs. Now that I know, I'll mention it in the next revision of the LangRef Update. Kind regards, Paul Vinkenoog