Subject | Re: Create procedure -- newbie coming from ms sql server |
---|---|
Author | martindevroom |
Post date | 2003-06-19T05:25:44Z |
Hi tim,
Thanks for that and the quick response.
the stored procedure worked (you'll be amazed to know :) )
although i did find the syntax a little odd.
I am using EMS interbase/firebird manager to connect to the database.
I tried running the stored procedure in the sql editor by typing
EXECUTE FIRSTPROCEDURE
but it gave me an error. any clues??
I'm now going to attemp to run the procedure from asp, I've already
managed to make a connection :)
If I can't find them docs i'll email you from my work address as they
won't fit in hotmail i think.
cheers
martin.
--- In firebird-support@yahoogroups.com, Tim Ledgerwood <tim@s...>
wrote:
Thanks for that and the quick response.
the stored procedure worked (you'll be amazed to know :) )
although i did find the syntax a little odd.
I am using EMS interbase/firebird manager to connect to the database.
I tried running the stored procedure in the sql editor by typing
EXECUTE FIRSTPROCEDURE
but it gave me an error. any clues??
I'm now going to attemp to run the procedure from asp, I've already
managed to make a connection :)
If I can't find them docs i'll email you from my work address as they
won't fit in hotmail i think.
cheers
martin.
--- In firebird-support@yahoogroups.com, Tim Ledgerwood <tim@s...>
wrote:
> Hi,by
>
> Welcome to a decent database. :-)
>
> Unlike SQL Server and Sybase (SQL Server was originally developed
> Sybase), you cannot just do a "select *" in a Stored Procedure inInterbase
> or Firebird.like to
>
> (although - note for the Powers that Be - this is something I would
> see in FB if possible)Forge Web
>
> As far as documentation goes, you should download the Interbase
> documentation off either the IBPhoenix web site, or the Source
> site. If you can't find it, email me directly, and I'll email youthe PDF
> files. The documentation is very good, IMHO.your Stored
>
> You have to put your selected fields into return parameters. So
> Procedure should look something like the following :probabally.
>
> CREATE PROCEDURE FirstProcedure
> RETURNS
> (FirstName VARCHAR (XXX))
> AS
> BEGIN
> FOR select FirstName from TBLMARTIN
> INTO
> :FirstName
> DO
> BEGIN
> SUSPEND;
> END
> END
>
>
>
> At 04:42 AM 06/19/2003 +0000, you wrote:
>
> >Hi,
> >
> > This is going to sound like a real dumb question to tou
> >Firstly, my background is in ms sql server, and I have been lookinghttp://docs.yahoo.com/info/terms/
> >at firebird for the first time today.
> >So I manged to create a table and populate it wil data.. hooray..
> >
> >CREATE TABLE TBLMARTIN (
> > FIELD1 SMALLINT,
> > FIRSTNAME VARCHAR (50) CHARACTER SET WIN1251 COLLATE WIN1251);
> >
> >insert into TBLMARTIN (FIELD1,Firstname) values
> >(1,'martin') /*several time*/
> >
> >next I wrote a simple select statement and again it worked.
> >
> >select FirstName from TBLMARTIN
> >
> >then a decieded to encapsulate my select query into a stored
> >procedure. This is where I hit real problems.
> >I would have expected the following to work
> >
> >CREATE PROCEDURE FirstProcedure
> >AS
> >BEGIN
> > select FirstName from TBLMARTIN;
> >END
> >
> >but it doesn't.
> >
> >I have a million more questions about firebird and finding
> >documentation is proving troublesome.
> >
> >Can anybody please point me to some tutorials that will help me
> >accomplish tasks similar to above such as writing tiggers,udf's,
> >views ect..
> >
> >any help i appreciated.
> >
> >cheers
> >
> >martin.
> >
> >
> >
> >
> >
> >
> >
> >
> >To unsubscribe from this group, send an email to:
> >firebird-support-unsubscribe@yahoogroups.com
> >
> >
> >
> >Your use of Yahoo! Groups is subject to
> >
> >
> >
> >
> >---
> >Incoming mail is certified Virus Free.
> >Checked by AVG anti-virus system (http://www.grisoft.com).
> >Version: 6.0.489 / Virus Database: 288 - Release Date: 06/10/2003
>
>
> [Non-text portions of this message have been removed]