It probably uptypes the data to double if it is not currency. Dennis McGrath
________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of David Blocker Sent: Friday, June 11, 2010 2:18 PM To: RBASE-L Mailing List Subject: [RBASE-L] - Re: Row size exceeds 4096 bytes Karen Thanks for the suggestion ? with 1 minor change I used it and it?s much faster than the cursor program I had created. Instead of INTERSECTing the 2 temp tables ? unacceptable because it created a PERMANENT table and I needed a TEMP table that could be regenerated whenever needed, as a view would be ? I just created the Temp structure of the final table and did a 2 table select to insert the rows into the final table. The fascinating thing about all this, STILL unexplained as far as I can see, is that it?s NOT that the SELECT is too big, or has 2 many columns. The 2 table select works just fine. It?s that there seems to be a limit of how many SUM( ) expressions a SELECT can have that I?m running into, but it gives the error message about ?Row length excees maximum of 4.096 characters?. Does the internal table R:Base creates when you do a SELECT generate WIDER columns if it?s a SUM? David "David Blocker [email protected] Office: 781-344-1920 Cell: 339-206-0261" -----Original Message----- From: [email protected] [mailto:[email protected]] Sent: Friday, June 11, 2010 08:27 AM To: 'RBASE-L Mailing List' Subject: [RBASE-L] - Re: Row size exceeds 4096 bytes David: Can't remember if you ended up solving this, but I had an idea and it doesn't seem like it would be very hard: 1. Create 2 temp tables with half of the columns in each. Insert data into each of the tables, including those 4 or 5 "group by" columns you have. 2. Then just do an INTERSECT table1 WITH table2 FORMING endingtable That should give you a table with all the columns, and I don't think any of the commands would exceed the row length size. Karen

