Karen,
I have inserted null values before. (Not saying it is best practice, but it should work) I just tested the below . (ver. V8) R>set var x text = null R>set var y text = null R>insert into awmlist (location,storenumber) values .x,.y Successful INSERT operation, 1 rows generated. R>sel all from awmlist where count = last Location StoreNum -------- -------- -0- -0- So I believe your inserting nulls is not the issue. The error message "....end with a binary operator" would lead me to believe that the system is evaluating the last "-" in your variables value of "-0-" as a minus sign, thus the binary operator message. I am sure you have checked, but it seems that your null assignment is not as expected. Try a simple insert command similar to what I have above in two different databases. If it works in one and not the other, then it is a setting issue. (It works in mine OK) -Bob ----- Original Message ----- From: [email protected] To: "RBASE-L Mailing List" <[email protected]> Sent: Monday, March 15, 2010 10:55:42 AM GMT -06:00 US/Canada Central Subject: [RBASE-L] - Someone test an INSERT statement for me? A client is running build .30305, which I believe is the latest .. A program (run daily, untouched since 9/2009) does an insert into a table using a combination of columns and variables. The syntax is: INSERT INTO sales + (invoiceno, trandate, trantime, accountno, billaccount, brate) + SELECT invoiceno, .#DATE, .#TIME, accountno, .vmacctno, .vBillRate + FROM tempsales WHERE ..... The 2 variables referenced (vmacctno and vbillrate) are predefined, and are populated by a "select into". However, the vBillRate could be null. In that case, I see it in my variable list as vBillRate REAL with no value I swear this must have happened before (but maybe not), but when vBillRate is null, the insert fails and I get the message "An expression cannot end with binary operator" If I replace the vBillRate with a 0 , then the insert works. Whileopt is OFF, Zero is ON. My null setting is the default -0-. If I change the null setting to ' ' (blank space) right before the insert, the insert still fails but with: "incorrect number of values for this table" So now I'm pretty worried about other places I might have a null variable being inserted... What do other programmers do? Is this bad programming? Should each variable be populated with something? What if you want a number value to be truly null, and not a 0? Karen

