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 July 23rd, 2005, 03:27 PM
locoHost locoHost is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Posts: 3 locoHost User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 40 m 3 sec
Reputation Power: 0
Question Error in simple Stored Procedure

I've been writing SPs for MSSQL T-SQL for many years but I'm new to Firebird and SQL99 stuff. Here's a simple (I thought) SP that won't compile..

CREATE PROCEDURE SP_PLAYERFIND ( PLAYERNAME VARCHAR(16) )
RETURNS ( PLAYERKEY NUMERIC(15,0) )
AS
BEGIN
SELECT PKEY FROM PLAYERS WHERE PLAYERNAME=:PLAYERNAME INTO :PLAYERKEY;
SUSPEND;
END

The error returned by IBEasy SQL tool is "Unexpected end of command".

I've tried many different ways of entering this in various upper/lower case, with/without semi-colons, with/without "suspend" combinations. I always get an error when I try to compile it.

I'd -greatly- appreciate your expert advice.

Reply With Quote
  #2  
Old July 24th, 2005, 07:27 AM
SilverDB's Avatar
SilverDB SilverDB is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Romania
Posts: 173 SilverDB User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 45 m 53 sec
Reputation Power: 5
Send a message via Yahoo to SilverDB
Declare The Playerkey As Integer
"returns ( Playerkey Integer )"
__________________
If i've been helpful, please add to my reputation.
My unfinished site: http://www.dever.ro

Reply With Quote
  #3  
Old August 1st, 2005, 02:57 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
Quote:
Originally Posted by locoHost
I've been writing SPs for MSSQL T-SQL for many years but I'm new to Firebird and SQL99 stuff. Here's a simple (I thought) SP that won't compile..

CREATE PROCEDURE SP_PLAYERFIND ( PLAYERNAME VARCHAR(16) )
RETURNS ( PLAYERKEY NUMERIC(15,0) )
AS
BEGIN
SELECT PKEY FROM PLAYERS WHERE PLAYERNAME=:PLAYERNAME INTO :PLAYERKEY;
SUSPEND;
END

The error returned by IBEasy SQL tool is "Unexpected end of command".

I've tried many different ways of entering this in various upper/lower case, with/without semi-colons, with/without "suspend" combinations. I always get an error when I try to compile it.

I'd -greatly- appreciate your expert advice.


Can you tell us version of Firebird? It compiles and runs fine here (FB 1.5.2). I haven't tried FB 2.0 yet...

--
Best regards,
Fikret Hasovic http://fikret.fbtalk.net
USAID TAMP Senior Programmer

* Firebird Foundation member.
- Join today at http://www.firebirdsql.org/ff/foundation
* JEDI VCS contributor
http://jedivcs.sourceforge.net/
* Firebird and Fyracle news
http://www.fyracle.org

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > Error in simple 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 1 hosted by Hostway
Stay green...Green IT