samedi 1 août 2015

Inserting large amount of data (5k rows) from one table to another shuffles rows in SQL Server

I use SQL Sserver 2008.

While inserting large amount of data (about 5k rows) from one table to another shuffles rows. This happens only few times, not always. I have also used Order by clause to order the rows.

Is this possible?

The query is shown here:

INSERT INTO R_G_23 (Sr_No, Date, Item_Code, Item_Name, Received_Qty, Invoice_No, Invoice_Date, Supplier_ECC_No, Supplier_Name, Supplier_Address, Range_and_Division, Issued_Challan_No, Issued_Date, Issued_Qty, Ar_In_No_Date, Qty,Doc_Part, Otherwise_Qty, Balance_Qty, Excise_Officer_Initial, GRN_No)
   SELECT 
       Sr_No, Date, Item_Code, Item_Name, Received_Qty, Invoice_No, Invoice_Date, Supplier_ECC_No, Supplier_Name, Supplier_Address, Range_and_Division, Issued_Challan_No, Issued_Date, Issued_Qty, Ar_In_No_Date, Qty,Doc_Part, Otherwise_Qty, Balance_Qty, Excise_Officer_Initial, GRN_No
   FROM 
       Temp_R_G_23 
   ORDER BY 
       Sr_No asc;

Aucun commentaire:

Enregistrer un commentaire