Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Question on Stored Proc SQL and other
Fri, Jan 5 2007 5:44 AMPermanent Link

"Stefano Monterisi"
Hi Tim,
with EDB, what is the level of SQL that we can use in Procedures?
I intend: what statements (FOR NEXT, BEGIN END, IF, CASE, etc.), functions,
etc....
There is the capability to load a procedure from another procedure?
Most important: there is the capability to scan record by record during
querying as FOR SELECT in Firebird?

There is a "domain" manager in your plain?
Triggers are present, but columns checks with exception manager?


Thanks in advance, Tim
and happy new year.

Stefano Monterisi


Fri, Jan 5 2007 2:22 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Stefano,

<< with EDB, what is the level of SQL that we can use in Procedures? >>

Everything  - DML, DDL, and control statements.

<< There is the capability to load a procedure from another procedure? >>

Do you mean call a procedure from another procedure ?  If so, then yes, you
can use the CALL statement like this:

CALL MyProcedure(MyParam1, MyParam2);

<< Most important: there is the capability to scan record by record during
querying as FOR SELECT in Firebird? >>

You have to use a cursor to do the same thing:

DECLARE Test CURSOR FOR stmt;

PREPARE stmt FROM 'SELECT * FROM biolife';

OPEN Test;

FETCH FIRST FROM Test;

SET TestCount=0;

WHILE NOT EOF(Test) DO
  SET TestCount=TestCount+1;
  FETCH NEXT FROM Test;
END WHILE;

This type of syntax is much closer to what people are expecting coming from
DBISAM.

<<  There is a "domain" manager in your plain? >>

Domains are being phased out in the SQL standard in favor of user-defined
types and objects.  Until this is firmed up more, we're sticking with the
standard types.

<< Triggers are present, but columns checks with exception manager? >>

I'm not sure I understand the question.  Could you please elaborate ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Jan 10 2007 7:06 AMPermanent Link

"Stefano Monterisi"
Hi Tim,
All ok for my questions except this
;
> << Triggers are present, but columns checks with exception manager? >>
>
> I'm not sure I understand the question.  Could you please elaborate ?

In firebird I can code exceptions routines and assign them (check constrain)
for validate columns and data values at db level (please see firebird Smile)
Even, It is possible assign calculation (via formula) to a column at
database level (not default value, but a calculate value);

Have you planned those things ? Smile

Where I can find statements and example for manage StoredProc? It seems very
powerful !!!

Thanks in advance,

Stefano Monterisi


>
> --
> Tim Young
> Elevate Software
> www.elevatesoft.com
>

Wed, Jan 10 2007 5:55 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Stefano,

<< In firebird I can code exceptions routines and assign them (check
constrain) for validate columns and data values at db level (please see
firebird Smile) >>

Yes, EDB has CHECK constraints:

http://www.elevatesoft.com/edb1sql_create_table.htm

<< Even, It is possible assign calculation (via formula) to a column at
database level (not default value, but a calculate value); >>

Yes, EDB has generated columns also (see above link).

<< Where I can find statements and example for manage StoredProc? It seems
very powerful !!! >>

The manual help is here:

http://www.elevatesoft.com/edb1sql_sql_psm.htm

but it isn't complete yet, so only the syntax is correct.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image