Subject Stored procedure returns no data
Author Jonas Olofsson
Hi all

I have a simple SP that just tries to extract one row of data from
table based on a string ref... But I always get an empty result when
calling "SELECT * FROM SP_GET_CONTAINER(REF)" where REF is an already
existing string in the CONTAINERREF column...

Anyone that can help me with what I am doing wrong?

// Kind Regards
Jonas Olofsson

PROCEDURE SP_GET_CONTAINER (
REF Varchar(50) CHARACTER SET NONE )
RETURNS (
CONTAINERID Integer,
CONTAINERREF Varchar(50) CHARACTER SET NONE,
STOCKLOCATIONID Integer,
LOCATIONID Integer,
NAME Varchar(50) CHARACTER SET NONE,
DESCRIPTION Varchar(100) CHARACTER SET NONE,
TAREWEIGHT Integer,
STATUS Integer,
LOTSALLOWED Integer )
AS
BEGIN
SELECT CONTAINERID,CONTAINERREF,STOCKLOCATIONID,LOCATIONID,
NAME,DESCRIPTION,TAREWEIGHT,STATUS,LOTSALLOWED
FROM CONTAINERS
WHERE CONTAINERREF = :REF AND DELETED IS NULL
INTO :CONTAINERID,:CONTAINERREF,:STOCKLOCATIONID,
:LOCATIONID,:NAME,:DESCRIPTION,:TAREWEIGHT,:STATUS,
:LOTSALLOWED;
END;

TABLE CONTAINERS(
CONTAINERID Integer NOT NULL,
CONTAINERREF Varchar(50) CHARACTER SET NONE,
STOCKLOCATIONID Integer,
LOCATIONID Integer,
NAME Varchar(50) CHARACTER SET NONE,
DESCRIPTION Varchar(100) CHARACTER SET NONE,
TAREWEIGHT Integer,
STATUS Integer,
LOTSALLOWED Integer,
DELETED Timestamp,
CONSTRAINT PK_CONTAINERS_1 PRIMARY KEY (CONTAINERID),
CONSTRAINT UNQ_CONTAINERS_1 UNIQUE (CONTAINERREF)
);