OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
General error;-9211 POS(1) System error: KB Stack type illegal

From: Alexey Gaidukov (gaiddc.baikal.ru)
Date: Mon Aug 15 2005 - 22:12:35 CDT


CREATE TABLE "GIS"."INVEST"
(
    "COUNTER" Integer NOT NULL,
    "CARTNUM" Integer NOT NULL,
    "MEDORDER" Integer NOT NULL,
    "FINANSID" Smallint NOT NULL,
    "POLSER" Varchar (15) UNICODE,
    "POLNUM" Varchar (30) UNICODE,
    "DOGNUM" Varchar (50) UNICODE,
    "COMPANY" Smallint,
    "DOCID" Varchar (10) UNICODE,
    "RESID" Varchar (10) UNICODE NOT NULL,
    "DATERES" Date,
    "TIMERES" Time,
    "CABID" Varchar (15) UNICODE,
    "KUO" Fixed(3,2) NOT NULL,
    "IDPRIHOD" Integer,
    "IDRASHOD" Integer,
    "DATE_TARIF" Date,
    "COMMENTS" Varchar (1000) UNICODE,
    "FACTRESID" Varchar (10) UNICODE,
    "REASON" Varchar (100) UNICODE,
    "KMU" Integer,
    "KOORDINATOR_COMMENTS" Varchar (1000) UNICODE,
    "DOCTORID" Varchar (10) UNICODE,
    PRIMARY KEY ("COUNTER")
)
//
CREATE INDEX "INVEST_CARTNUM" ON "GIS"."INVEST"("CARTNUM" ASC)
//
CREATE INDEX "INVEST_MEDORDER" ON "GIS"."INVEST"("MEDORDER" ASC)
//
CREATE FUNCTION KASSA.DR(p_count integer) returns smallint AS
VAR
    did smallint;
BEGIN
    return 0;
END;
//
drop FUNCTION KASSA.HL
//
CREATE FUNCTION KASSA.HL(
    p_cartnum integer,
    p_dateres date) returns smallint AS
VAR
    lab smallint;
    res varchar(10);
BEGIN
    return 0;
END;

The following statements generate the error (-9211)

SELECT i.COUNTER
FROM gis.invest i
WHERE i.medorder=2480527 and
hl(cartnum,dateres)=0 and dr(counter)=0

---- Error -------------------------------
Auto Commit: On, SQL Mode: Internal, Isolation Level: Committed
 General error;-9211 POS(1) System error: KB Stack type illegal

SELECT i.COUNTER
FROM gis.invest i
WHERE i.cartnum=6280 and
hl(cartnum,dateres)=0 and dr(counter)=0

---- Error -------------------------------
Auto Commit: On, SQL Mode: Internal, Isolation Level: Committed
 General error;-9211 POS(1) System error: KB Stack type illegal

I have found than the next statement works well

SELECT i.COUNTER
FROM gis.invest i
WHERE i.counter=1 and
hl(cartnum,dateres)=0 and dr(counter)=0

All of them works with the same rows. And if remove parameter p_dateres
from the function KASSA.HL then it will work well.

Can you help me?

--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb