At 06:25 PM 9/26/2005, Claudine Robbins wrote:

CREATE TABLE `D_PREBILL`  +
(`INVOICE_ID` INTEGER  ,  +
 `PRE_INVOICE_NB` INTEGER  ,  +
 `IEX_INV` TEXT    (10) ,  +
 `PRE_FLAG` TEXT    (1) ,  +
 `PRE_TS` DATETIME ,  +
 `PRE_USER` TEXT    (10) )

My eep:

set var vinvoiceid integer = 9999
set var v_header_carinv text = 'trouble001'
set var vtimestamp datetime = (datetime(.#date,.#time))
set var vuser text = (cval('netuser'))

SET VAR vpreinvnbr INTEGER = NULL
SET VAR vtextinvnbr TEXT = NULL
SELECT (MAX(pre_invoice_nb)+1) INTO vpreinvnbr FROM d_prebill
SET VAR vtextinvnbr TEXT = ((SGET((CTXT(.vpreinvnbr)),4,1)) + '-' +
(SGET((CTXT(.vpreinvnbr)),4,5)))

INSERT INTO d_prebill +
VALUES (.vinvoiceid,.vpreinvnbr,.v_header_carinv,'N',.vtimestamp,.vuser)

I get message "Incorrect number of values for this table"


Claudine,

A few suggestions:

01. Before INSERTing a row, make sure to check the actual values for
    the following variables:

    vinvoiceid
    vpreinvnbr
    v_header_carinv
    vtimestamp
    vuser

    Specifically, look for the additional comma ",".

02. Check the database CHARacter SETTings, especially the DELIMIT and
    QUOTES.

    SHOW CHAR

Hope that helps!

Very Best R:egards,

Razzak.

Reply via email to