Re: Informix Stored Procedures
Posted in 1996
On 26 Mar 1996 00:05:11 GMT, you wrote:
}I am in desperate need of help with Informix stored procedures. I am quite new to informix and am trying to
}write my first stored procedure. The problem is that I keep getting a syntax error (-201). I am using Informix -Online
}Verson 5. I have included the syntax being used below.
}
}CREATE PROCEDURE test_proc ()
} RETURNING CHAR(90) ;
}
} DEFINE profile CHAR(90) ;
}
} SELECT database_profile
} INTO profile
} FROM "csa".pfsec_db ;
}
} RETURN profile ;
}
}END PROCEDURE ;
}
}I have successfully created the stored procedure without any code between the create statement and the end
}procedure statement, but as soon as I include any other lines in between I get the error.
}
Domenic,
I typed in your example procedure and it was stored and ran without
error. I don't have a table named "csa".pfsec_db so I changed the
select to:
SELECT TODAY FROM systables WHERE tabid = 1;
Are you certain that what appears in your mail is what you're typing?
On what line and on what character does it say the error occurred?
(BTW, I tested this on a 5.01.UD2)
======================================================================
Craig Kickel | Unix/C/Database Consultant
ckickel@cyberhighway.net | <This space intentionally left blank>
======================================================================