Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • 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!

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

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.

I need basic syntax help

I need basic syntax help

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.


RE: I need basic syntax help

It's this waht you have in mind:


CREATE PROCEDURE test_sp(x_char VARCHAR(50))

LET x_char = "my value";

RETURN x_char;


Execute it from dbaccess:


EXECUTE PROCEDURE test_sp("your value")

RE: I need basic syntax help


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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

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