Subject | Overflow occured during datatype conversion. Conversion error from string "BLOB" |
---|---|
Author | zzotnik |
Post date | 2008-04-01T15:41:49Z |
Hi guys,
I keep getting the error in the subject line with my stored
procedure. Here is the code, hope you guys can help me work out
something :-)
CREATE TABLE INVOICES (
INVOICEID INTEGER NOT NULL,
CUSTOMERNAME BLOB SUB_TYPE 1 CHARACTER SET ISO8859_2 NOT NULL
COLLATE ISO8859_2,
CUSTOMERPCODE BLOB SUB_TYPE 1 CHARACTER SET ISO8859_2 NOT NULL
COLLATE ISO8859_2,
CUSTOMERCITY BLOB SUB_TYPE 1 CHARACTER SET ISO8859_2 NOT NULL
COLLATE ISO8859_2,
CUSTOMERADDRESS BLOB SUB_TYPE 1 CHARACTER SET ISO8859_2 NOT NULL
COLLATE ISO8859_2);
CREATE PROCEDURE LOAD_INVOICE_LIST
RETURNS(
INVOICEID INTEGER,
CUSTOMERNAME BLOB SUB_TYPE 1 SEGMENT SIZE 1 CHARACTER SET
ISO8859_2,
CUSTOMERPCODE BLOB SUB_TYPE 1 SEGMENT SIZE 1 CHARACTER SET
ISO8859_2,
CUSTOMERCITY BLOB SUB_TYPE 1 SEGMENT SIZE 1 CHARACTER SET
ISO8859_2,
CUSTOMERADDRESS BLOB SUB_TYPE 1 SEGMENT SIZE 1 CHARACTER SET
ISO8859_2,
NETSUM DECIMAL(18, 2),
VATSUM DECIMAL(18, 2),
TOTALSUM DECIMAL(18, 2))
AS
BEGIN
FOR SELECT I.InvoiceID, I.CustomerName, I.CustomerPCode,
I.CustomerCity, I.CustomerAddress, Sum(II.ItemNetPrice *
II.Quantity),
Sum(II.ItemNetPrice * II.Quantity * II.VATPercentage / 100)
FROM Invoices I JOIN InvoiceItems II ON I.InvoiceID = II.InvoiceID
GROUP BY 1, 2, 3, 4, 5
INTO :InvoiceID, :CustomerName,
:CustomerPCode, :CustomerCity, :CustomerAddress, :NetSum, :VATSum
DO BEGIN
TotalSum = :NetSum + :VATSum;
SUSPEND;
END
END;
The problem occurs when I try to execute LOAD_INVOICE_LIST.
Big thanks!
I keep getting the error in the subject line with my stored
procedure. Here is the code, hope you guys can help me work out
something :-)
CREATE TABLE INVOICES (
INVOICEID INTEGER NOT NULL,
CUSTOMERNAME BLOB SUB_TYPE 1 CHARACTER SET ISO8859_2 NOT NULL
COLLATE ISO8859_2,
CUSTOMERPCODE BLOB SUB_TYPE 1 CHARACTER SET ISO8859_2 NOT NULL
COLLATE ISO8859_2,
CUSTOMERCITY BLOB SUB_TYPE 1 CHARACTER SET ISO8859_2 NOT NULL
COLLATE ISO8859_2,
CUSTOMERADDRESS BLOB SUB_TYPE 1 CHARACTER SET ISO8859_2 NOT NULL
COLLATE ISO8859_2);
CREATE PROCEDURE LOAD_INVOICE_LIST
RETURNS(
INVOICEID INTEGER,
CUSTOMERNAME BLOB SUB_TYPE 1 SEGMENT SIZE 1 CHARACTER SET
ISO8859_2,
CUSTOMERPCODE BLOB SUB_TYPE 1 SEGMENT SIZE 1 CHARACTER SET
ISO8859_2,
CUSTOMERCITY BLOB SUB_TYPE 1 SEGMENT SIZE 1 CHARACTER SET
ISO8859_2,
CUSTOMERADDRESS BLOB SUB_TYPE 1 SEGMENT SIZE 1 CHARACTER SET
ISO8859_2,
NETSUM DECIMAL(18, 2),
VATSUM DECIMAL(18, 2),
TOTALSUM DECIMAL(18, 2))
AS
BEGIN
FOR SELECT I.InvoiceID, I.CustomerName, I.CustomerPCode,
I.CustomerCity, I.CustomerAddress, Sum(II.ItemNetPrice *
II.Quantity),
Sum(II.ItemNetPrice * II.Quantity * II.VATPercentage / 100)
FROM Invoices I JOIN InvoiceItems II ON I.InvoiceID = II.InvoiceID
GROUP BY 1, 2, 3, 4, 5
INTO :InvoiceID, :CustomerName,
:CustomerPCode, :CustomerCity, :CustomerAddress, :NetSum, :VATSum
DO BEGIN
TotalSum = :NetSum + :VATSum;
SUSPEND;
END
END;
The problem occurs when I try to execute LOAD_INVOICE_LIST.
Big thanks!