Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create a procedure with PSQL 8

Status
Not open for further replies.

Mimi2012

Programmer
Aug 28, 2012
3
CA
Hi,

I'm trying to create a stored procedure that seeks a string (eg '0099 ') in a column of type 50 times PIC 9(4)
COMPANIES column is as follows:
0099006901610169000000000000000000000000000000000000000000000000000000000

Here is my sp:

CREATE PROCEDURE usp_GetCompanyInfo (in: CompanyID char (4))
RETURNS (
Group integer,
Name varchar (30)
);
BEGIN
SELECT GROUP NAME
FROM MYTABLE
WHERE (COMPANIES LIKE: CompanyID);
END;

When I execute the SP
usp_GetCompanyInfo call ('0099 ')
it does not work

Thanks for your help!

Mimi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top