How to fetch records from temporary table ?

Dear all,

I have one requirement,so i am using the Temporary table.Here i am able to insert the record into my temporary table but i am not able to fetch the record from it.

Requirement is,

i wanted to insert the record into the temp table and fetch those inserted records from it. Thats it !!

Kindly anybody help me out on this stuff.

See whether this link helps…

http://www.axaptapedia.com/index.php?title=Temporary_tables

  • Arun

Thanks for your response.

But i have written the codes according to axpata pedia only as,

MyTable tempTable,tempTable1;

tempTable,settemp();

tempTable.id = ‘1’;

tempTable.insert();

select tempTable1;

info(int642str(tempTable1.recId));

this is the code i have written.it is inserting the record but not able to fetch the inserted record.

kindly tell me plz…

Thanks…

Hi Jagadis ,

Try this…

static void tempinsert(Args _args)

{

MyTable tempTable,myTable;

;

tempTable.setTmp();

/* tempTable.id = ‘4’;

tempTable.Name = “Ravindar”;

tempTable.insert();

tempTable.Id = ‘2’;

tempTable.Name = “Chandra”;

tempTable.insert();

tempTable.Id = ‘3’;

tempTable.Name = “Mahi”;

tempTable.insert();

*/

while select * from myTable

{

//info(strFmt("%1,%2",tempTable1.Id,tempTable1.Name));

tempTable.Id = myTable.Id;

tempTable.Name = MyTable.Name;

tempTable.insert();

}

while select * from tempTable

{

info(strFmt("%1,%2",tempTable.Id,tempTable.Name));

}

}