Subject | RE: [firebird-support] Stored procedure returns no data |
---|---|
Author | Ricardo Agüero Rodas |
Post date | 2007-06-13T13:30:16Z |
Sorry my english
I think your calling sentence is not rigth.
Yo should write some think like this:
Select * from sp_get_container( + ref + )
I hope this can help you.
Ricardo.
_____
De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] En nombre de Jonas Olofsson
Enviado el: miércoles, 13 de junio de 2007 8:55
Para: firebird-support@yahoogroups.com
Asunto: [firebird-support] Stored procedure returns no data
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)
);
[Non-text portions of this message have been removed]
I think your calling sentence is not rigth.
Yo should write some think like this:
Select * from sp_get_container( + ref + )
I hope this can help you.
Ricardo.
_____
De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] En nombre de Jonas Olofsson
Enviado el: miércoles, 13 de junio de 2007 8:55
Para: firebird-support@yahoogroups.com
Asunto: [firebird-support] Stored procedure returns no data
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)
);
[Non-text portions of this message have been removed]