Moving data from one table to another table on a different server

I’m trying to copy a few rows from one table to a table on a different server. The table structures the same in both. People mentioned using a trigger but that wouldn’t work for my solution.

We could create a script but it’s going to be done several times, and that adds to much risk. Any other options?

Edit: We aren’t able to do Linked Servers :(

Moving data from one table to another table on a different server

Moving data from one table to another table on a different server

I’m trying to copy a few rows from one table to a table on a different server. The table structures the same in both. People mentioned using a trigger but that wouldn’t work for my solution.

We could create a script but it’s going to be done several times, and that adds to much risk. Any other options?

Edit: We aren’t able to do Linked Servers :(

Moving data from one table to another table on a different server

count the number of values in array

When I navigate to my jQuery Datatable I would like to display how many Users are pending activation. Normaly I would use fnGetData with (this) however as I am not trying to do this on a click event and I am simply just trying to count the number in the entire table im not sure how to do it:

   $(document).ready(function () {
        var oTable = $('#example2').dataTable({
            "aoColumns": [
                            { "sName": "Id" },
                            { "sName": "ProfileId" },
                            { "sName": "Type" },
                            { "sName": "Name" },
                            { "sName": "Email" },
                            { "sName": "PendingActivation" }
            ]
        });
        //not sure if this is correct
        $(function () {
            //store table data 
            var oDataCount = oTable.fnGetData();
            //store only the pending column (6th column)
            var pendingA = oDataCount[5];
            //store count of above column
            var pendingCount = function (pendingA){
                //if pendingA is not null and equals 1
                if (pendingA != null && pendingA == '1') { 
                    //then count
                    pendingA.Length;
                }
            }
                //pass count to html
                $(".panel-footer #pending").val(pendingCount);
        });

read more

count the number of values in array

When I navigate to my jQuery Datatable I would like to display how many Users are pending activation. Normaly I would use fnGetData with (this) however as I am not trying to do this on a click event and I am simply just trying to count the number in the entire table im not sure how to do it:

   $(document).ready(function () {
        var oTable = $('#example2').dataTable({
            "aoColumns": [
                            { "sName": "Id" },
                            { "sName": "ProfileId" },
                            { "sName": "Type" },
                            { "sName": "Name" },
                            { "sName": "Email" },
                            { "sName": "PendingActivation" }
            ]
        });
        //not sure if this is correct
        $(function () {
            //store table data 
            var oDataCount = oTable.fnGetData();
            //store only the pending column (6th column)
            var pendingA = oDataCount[5];
            //store count of above column
            var pendingCount = function (pendingA){
                //if pendingA is not null and equals 1
                if (pendingA != null && pendingA == '1') { 
                    //then count
                    pendingA.Length;
                }
            }
                //pass count to html
                $(".panel-footer #pending").val(pendingCount);
        });

read more

Java regular expression that match one condition on the left

I need help with a Java regular expression that satisfies the conditions in my parseDouble method. Regex should only match if two conditions are met; representation can be any of integer, backspace, dot, dash and representation must contain integer.

public class RegexpDemo {
    public static void main(String[] args) {
    test();
    }

private static boolean parseDouble(final String representation)  {
    //only matches if representation is either a backspace, integer, . or -
    //and if no integer is present at all in representation (despite the others present), 
    //e.g "krest .ter" then there should not be a match
    final String regex = "[\\s\\d\\.-]";
    try {
        if (representation.matches(regex)){     
            return true;
        } else {
            return false;
        }
    } catch (NumberFormatException nfe) {
        System.out.println("Exception occurred");
        return false;
    }
}

private static void test() {
    /*
     * Expected sample test result:
     * " " - > true
     * "" - > false
     * "34 90 . 5" -> true
     * "krest ter" -> false
     * "-345.90.34" - > true
     */
 final String test[] = {" ", "", "34 90 . 5","krest ter","-345.90.34"};
 for (int i = 0; i < test.length; i++) {
     System.out.println(test[i] + " -> " + parseDouble(test[i]));
 }
}

read more