Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Donate Today!

Do you enjoy these
technical forums?
Donate Today! Click Here

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

thendrickson (Programmer)
27 Jul 06 16:30
I am a SQL Server developer with some old experience with a UNIX OS

I need to develop a stored procedure for an Informix database located on a linked server, but I seem to be getting syntax errors that I do not quite understand.

Could some one post a couple of examples of a basic stored procedure that accepts 1 or more input parameters? Preferably the varchar datatype for one of the parameters.

Additionally, I am using an application named dbaccess under UNIX. dbaccess permis me to open the vi editor from within dbaccess.

When I past my code into the vi editor, it loks pretty good but when I attempt to run the code in dbaccess several of the lines appear truncated.

I have few permissions other than to create stored procedures under my login even though this is a development server, so I am limited to these basic tools.

Thanks

olded (Programmer)
28 Jul 06 0:11
It's this waht you have in mind:

CODE


CREATE PROCEDURE test_sp(x_char VARCHAR(50))
    RETURNING VARCHAR(255);

LET x_char = "my value";

RETURN x_char;

END PROCEDURE;

Execute it from dbaccess:

CODE

EXECUTE PROCEDURE test_sp("your value")
thendrickson (Programmer)
28 Jul 06 8:04
Bingo!

CREATE PROCEDURE test_sp(x_char VARCHAR(50))
    RETURNING VARCHAR(255); <-------- I did not have this semicolon!!!!

I said it was basic. I could not find a simple example to build from.

Thank you very much

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close