Subject Re: I can't find the error in this very short SP
Author Adam
--- In firebird-support@yahoogroups.com, Mark Deibert
<mark.deibert@g...> wrote:
> So the "rule" is put a semicolon at the end of every line of SQL
but no
> where else. I saw an example somewhere using the SET TERM
statement. Is this
> common practice? It does make sense. Some of my data may contain
semicolons.

Well it doesn't matter if it is quoted,

insert into test(id, descr) values (1,';');

Is perfectly fine.

The problem is that when Firebird encounters a terminator character,
it tries to execute that statement. Now obviously triggers and stored
procedures need to include semi-colons to internally flag that that
operation is done.

set term is just a way to change the semi-colon to something else so
you can include a semi colon inside your stored procedure or trigger
(which you often need to do).


> There should never be a duplicate player name.

Unless your player names are unusually unique, I would not rely on
this to be true. It might be highly unlikely, but how would your
product cope if it did occur?

> In TSQL "First" equals "Top". Thats good info to have.
> I'll be headed to Borders this weekend to pick up a PSQL book.

Select FIRST n SKIP m

FB 2 will introduce the ROW or ROWS or whatever the other syntax is.

Do you have
> any favorite authors or titles I should look for?

The Firebird Book by Helen Borrie is the best one available.

Adam