SELECT clistates<br>scan<br>if trans_type = 'OB' and amount > -10 and amount < 10<br> theclicode = cli_code<br> thecurrcode = curr_code<br> select cli_code from clistates; <br> where;<br> cli_code = theclicode and curr_code = thecurrcode ;<br> INTO table c:\statetemp<br> IF reccount() = 1 <br> select clistates<br> delete<br> ENDIF <br>endif<br>endscan<br>SELECT clistates<br><br> <br>REPLACE ALL last_stmt WITH ldtodaysDate-45 FOR ISNULL(last_stmt)<br>GO TOP<br><br>ALTER TABLE clistates ADD COLUMN bbfwd n(16,2) NULL<br>ALTER TABLE clistates ADD COLUMN finpl n(16,2) NULL<br>ALTER TABLE clistates ADD COLUMN sptpl n(16,2) NULL<br>ALTER TABLE clistates ADD COLUMN payrecd n(16,2) NULL<br>ALTER TABLE clistates ADD COLUMN paysent n(16,2) NULL<br>ALTER TABLE clistates ADD COLUMN payencl n(16,2) NULL<br>ALTER TABLE clistates ADD COLUMN stmt_no I NULL<br>ALTER TABLE clistates ADD COLUMN stmtbal n(16,2) NULL<br>ALTER TABLE clistates ADD COLUMN smryText c(60) NULL<br> <br>ALTER TABLE clistates ADD COLUMN ClientName c(30) NULL<br>SELECT clistates<br>SCAN<br> REPLACE ClientName WITH " " <br>ENDSCAN<br><br>This is the main snippet - I have just found that occasionally it crashes at [REPLACE Clientname WITH " "]<br>Previous it was crashing a few lines on down from the snippet I have included when I tried to add data to the following columns:<br>SPTPL<br>STMT_NO<br>PAYSENT <br>Could it have something to do with deleting some rows from the clistates table before I add the new columns?