Creating TEMP tables with
Posted in 1994
root@candle.uucp wrote: BM> What do people do to create temporary tables with unique names? There are a million ways. Are they temporary as in CREATE TEMP TABLE? Presumably they are for use within a program? And presumably they have the same structure? BM> A code fragment would be nice. Given the above presumptious assumptions (and if somebody drops that hoary old story about "ass out of u and me both", I'm going to throw my toys out of my cot!) :-) And please, it is 11PM on a Saturday night, I'm just trying to convey the idea! -- start of code fragment -- assume (ahem!) variables are defined appropriately let tmp_cnt = 0 while true -- you'd be a silly bugger to actually run this unchanged let sql_stmt = "create table t_", tmp_cnt using "&&&&&&&&&", " (", " col_a integer,", " col_b date, ", " col_c char(20)", ")" prepare pre_create from sql_stmt execute pre_create let tmp_cnt = tmp_cnt + 1 end while -- end of code fragment. Please note that this is only one of the ways you can do this. If it's not appropriate, please clarify the problem and I'll have another go! Regards, billy.wheeler@digitec.co.za --- . SPEED 1.40 [NR] . WARNING! Do not look at laser with remaining eyeball! ---- Digitec Online - 20 Nodes....* Johannesburg, South Africa +27-11-476-2008 .............................* Best BBS * RsaNET User Choice Awards 1993 first.last@digitec.co.za.....* Best Sysop * RsaNET User Choice Awards 1993