Posted on: 3/26/2015 2:19:23 AM | Views : 672

Hai every body...
I have a problem with T-SQL. I use SQL Server 2012 Express with SP2 on Windows 7 32-bit SP1.
This is the problem
-- first, create table create table dtoth.tableA ( id_data TINYINT PRIMARY KEY, kd_data VARCHAR(20), nm_data VARCHAR(200) ); -- then, insert values INSERT INTO dtoth.tableA VALUES (0,'100.001','KAS'); INSERT INTO dtoth.tableA VALUES (1,'110.001','BANK'); INSERT INTO dtoth.tableA VALUES (2,'120.001','PIUTANG DAGANG'); INSERT INTO dtoth.tableA VALUES (3,'121.001','PIUTANG GIRO'); INSERT INTO dtoth.tableA VALUES (4,'130.001','PERSEDIAAN BARANG DAGANGAN'); -- then, i create a temporary table create table dtoth.temp_tableA ( kd_data VARCHAR(20), nm_data VARCHAR(200) ); -- then, i create a store procedure to call data from temporary table CREATE procedure dtoth.report AS BEGIN DELETE FROM dtoth.temp_tableA; INSERT INTO dtoth.temp_tableA SELECT kd_data, nm_da ...

Go to the complete details ...