Friday 20 July 2018

SQL Update target tables from 2 different databases

begin transaction;

update [destination database].[dbo].[destination table] 
set [destination database].[dbo].[destination table].'destination column' = source.'desired column'
from [source database].[dbo].[source table] source
inner join [destination database].[dbo].[destination table] destnation 
on destination.'column to join' = source.'column to join'

--rollback; 
--commit; 


Wednesday 4 July 2018

Vue.js Get Json Data and Display

Index.html
<html>
<title></title>
    <head>
        <!-- Import Vue library -->
        <script src="https://cdn.jsdelivr.net/npm/vue"></script>
    </head>
    <body>
        <div id="app">
            <li v-for="msg in json">
                {{msg}}
            </li>
            <input v-model="text"/>
            <button @click="DisplayData">Query</button>
        </div>
    <script src="index.js"></script>
    </body>
</html>


Index.js
var app = new Vue({
    el: "#app",
    data: {
        text: "",
        json: null
    },
    methods: {
        DisplayData: function () {
            if (this.text)
            {
                fetch("https://api.github.com/users/" + this.text)
                    .then(r => r.json())
                    .then(json => { this.json = json; });
            }
        }
    }
});


Upgrade Windows 11 Home to Windows 11 Pro

Disable internet connection (Wi-Fi, Internet, etc.) Change the product key using the following Generic product key:                     VK7J...