Claudine: I have your code running now. You need to make one change: SET VAR vtextinvnbr TEXT = ((SGET((CTXT(.vpreinvnbr)),4,1)) + '-' + (SGET((CTXT(.vpreinvnbr)),4,5)))
You need to add a "+" sign in the second line if the statement is in 2 lines; if the email editor wrapped it then it is OK. SET VAR vtextinvnbr TEXT = ((SGET((CTXT(.vpreinvnbr)),4,1)) + '-' + + (SGET((CTXT(.vpreinvnbr)),4,5))) Javier, Javier Valencia, PE President Valencia Technology Group, L.L.C. 14315 S. Twilight Ln, Suite #14 Olathe, Kansas 66062-4578 Office (913)829-0888 Fax (913)649-2904 Cell (913)915-3137 ================================================ Attention: The information contained in this message and or attachments is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all system and destroy all copies. ====================================================== -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] Behalf Of Claudine Robbins Sent: Monday, September 26, 2005 5:25 PM To: RBG7-L Mailing List Subject: [RBG7-L] - RBase says I can't count.... Hi everyone, My table: 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" I'm crossed-eyed from trying to figure this one out. TIA, Claudine :)
