Popular Posts

Mar 19, 2013

Copy data from one table to another







SqlConnection conn = new SqlConnection(connString);
        conn.Open();
        String copyData = "INSERT INTO t_VAT (VAT_Month, VAT_Date, orderType) SELECT VAT_Month, VAT_Date, orderType FROM t_VAT_TEMP";
        SqlCommand cmd = new SqlCommand(copyData, conn);
        int returnValue = cmd.ExecuteNonQuery();
        conn.Close();

No comments:

Post a Comment