Javier, Thank you, thank you, thank you. I'll buy you lunch at the conference. It was the date format/sequence, two-digit year instead of 4! I nearly pulled my hair out on this one!!!!! I'm smiling again!
Claudine :) > -----Original Message----- > From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Javier > Valencia > Sent: Monday, September 26, 2005 8:34 PM > To: RBG7-L Mailing List > Subject: [RBG7-L] - RE: RBase says I can't count.... > > Claudine: > Enclosed is the code that I actually ran and it executed perfectly, make > sure the format of your date and time are correct: > Some of the settings that might affect are: > DATE format MM/DD/YYYY > DATE sequence MMDDYYYY > Century threshold YEAR is 50 > Default CENTURY is 19 > TIME format HH:MM:SS > TIME sequence HHMMSS > (EQNULL ) OFF Treat null EQual NULL as a match > (ZERO ) ON Treat nulls as ZERO in numeric calculations > > > -- This is the code > 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) ) > > 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) > RETURN > > 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 8:20 PM > To: RBG7-L Mailing List > Subject: [RBG7-L] - RE: RBase says I can't count.... > > Thanks Javier, that part was working, it's the INSERT that's not. And > that's how I broke my db tonight too... > > > -----Original Message----- > > From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Javier > > Valencia > > Sent: Monday, September 26, 2005 5:57 PM > > To: RBG7-L Mailing List > > Subject: [RBG7-L] - RE: RBase says I can't count.... > > > > 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 :)
