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
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
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
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
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
, it's highly unlikely that
someone would need more than 3-5 levels.
HTH,
Paul Vinkenoog
select distinct , from
HTH,
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
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
lls nbackup within a loop, each time with a different
database name.
Hope this helps,
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
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
You're right; in Firebird 2.0 and up you can do a full shutdown, if necessary
in combination with -force.
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
uld not
advocate this. Once people are more knowledgeable, they can decide for
themselves what is safe and when.
Cheers,
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
mbedded
connections exist), but the standard mantra is "use gbak", simply because this
is *always* safe.
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
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
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
-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
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
your case, I assume that the
Fishbowl software has generated a secure SYSDBA password.
Kind regards,
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
And if you can't access those scripts, who can?
Kind regards,
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
with singleton
SELECT inserts.
Paul Vinkenoog
-table.html#langrefupd25-ct-unique-keys
Cheers,
Paul Vinkenoog
e either the PRIMARY KEY or UNIQUE.
Kind regards,
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
lectable stored procedure to achieve that, with the number of
rows as a parameter.
Or use EXECUTE BLOCK.
Cheers,
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
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
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
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
veel posted a solution in Firebird-Java.
Cheers,
Paul Vinkenoog
27;ll put that in the tracker for the doc subproject.
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
bird 2.1 or higher on the client machine.
Hope this helps,
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
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
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
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
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
need a BLOB in Firebird, whereas MySQL supports
(var)chars up to 64K.
Cheers,
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
e.
Kind regards,
Paul Vinkenoog
Firebird Documentation Team
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
merge
into emp
using temp
on emp.fruits = temp.fruits
when not matched then insert (fruits) values (temp.fruits)
Cheers,
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
50 matches
Mail list logo