|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Stored Procedure
I'm an AS400/VB.NET programmer that has worked with DB400 and MS-Access databases. I'm reviewing Firebird 1.5 as a true DBMS replacement to replace MS-Access. I've been very impressed with Firebird so far, and I'm glad to see that it is still evolving.
The area I'm a little uncomfortable with is documentation. I've been reading a lot of info from the web about Stored Procedures. They seem like a very good tool, but I can not find much documentation on coding/examples. Could someone offer a source for working with Stored Procedures? Below is a simple procedure I tried to write in IBSQL. CREATE PROCEDURE EMPINFO RETURNS(EmpId VARCHAR(9), uName VARCHAR(50)) AS DECLARE VARIABLE LastName VARCHAR(15); DECLARE VARIABLE FirstName VARCHAR(15); BEGIN FOR SELECT emp_id, last_name, first_name FROM employee_tbl INTO :EmpID, :LastName, :FirstName DO BEGIN uName = UPPER(:LastName || ", " || :FirstName); END SUSPEND; END ERROR RETURNED BY IBSQL ISC ERROR CODE:335544569 ISC ERROR MESSAGE: Dynamic SQL Error SQL error code = -206 Column unknown , At line 16, column 23. "LastName" |
|
#2
|
|||
|
|||
|
Quote:
Try this: SELECT emp_id, UPPER(last_name || ", " || first_name) as full_name FROM employee_tbl INTO :EmpID, :FullName; "as full_name" in select statement is not required. "UPPER(last_name || ", " || first_name)" is good enough ![]() |
|
#3
|
|||
|
|||
|
I thought that only inputs use the : not variables?
Hope this helps EMS has a nice freeware tool for Admin of FireBird. EMS FireBird SQL Manager ![]() Last edited by dcostelloe : March 13th, 2006 at 05:53 PM. Reason: Updated Link |
|
#4
|
|||
|
|||
|
URL
Free iPods and other items!!!!--->Click to Join Now and receive FREE ITEMS including including $250 USD!!! I'll pay $25 USD for anyone who signs up under me and completes an offer. As soon as offer greens I pay INSTANTLY!!! RewardBull-Free Cash/iPods - you can make up to $350 very easily!!! All you have to do is SignUp And Complete offers yourself, or get referrals to complete 1 bull each. |
![]() |
| Viewing: Dev Shed Forums > Databases > Firebird SQL Development > Stored Procedure |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|