Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 24th, 2004, 04:11 PM
jsacomp jsacomp is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 1 jsacomp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
firebird stored procedure

I am trying to create a basic stored procedure for Firebird and keep getting the following error:

Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Token unknown - line 5, char 1.
end.

Here is my syntax for the create procedure:

SET TERM ^ ;

CREATE PROCEDURE GetFirstName
AS
begin
select FirstName from Addresses
end
^

SET TERM ; ^

I have tried everything and cannot avoid the error. I have the Dialect set to 3 should you need that information.

I would appreciate any feedback.

Jason

Reply With Quote
  #2  
Old December 27th, 2004, 09:45 AM
fikret fikret is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Location: Sarajevo, Bosnia
Posts: 111 fikret User rank is Corporal (100 - 500 Reputation Level)fikret User rank is Corporal (100 - 500 Reputation Level)fikret User rank is Corporal (100 - 500 Reputation Level)fikret User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 5 h 32 m 11 sec
Reputation Power: 8
Try this

CREATE PROCEDURE GetFirstName
RETURNS (
FirstName VARCHAR(20))
AS
BEGIN
FOR SELECT FirstName
FROM Addresses
INTO :FirstName
DO
BEGIN
SUSPEND;
END
END

--
Best regards,
Fikret Hasovic http://fikret.fbtalk.net

FirebirdSQL Foundation member.
- Join today at http://www.firebirdsql.org/ff/foundation
JEDI VCS contributor
http://jedivcs.sourceforge.net/

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > firebird stored procedure


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway