Skip to main content

Posts

SQL table copies - SELECT INTO VS INSERT INTO

Creating a new table from another table  see:  https://www.w3 schools.com/sql/sql_select_into.asp This creates a new table and inserts all the data from the oldtable  SELECT  *  INTO   newtable  FROM   oldtable You can create a new empty table from the schema of an other using a statement like SELECT  *  INTO   newtable  FROM   oldtable  WHERE   1  =  0 ; Copy data from one table into another existing table  see:  https://www.w3schools.com/sql/sql_insert_into_select.asp Insert data from one table into another  INSERT   INTO   table2  SELECT  *  FROM   table1 If you need to specify a column list (as is the cast when dealing with identity insert), the syntax is... The tips are: Brackets are required around the destination fields No brackets are required around the select fields, just like a normal select statement  ...

Telstra Mobile Call Forwarding dial codes

To enable voicemail: *61*101**30# Divert to 101 when unanswered after 30 seconds *62*101# Divert to 101 when unreachable *67*101# Divert to 101 when busy *21*101# Divert all calls to 101 To disable voicemail: #61# Cancel divert when unanswered #62# Cancel divert when unreachable #67# Cancel divert when busy #002# Cancel all diverts To Check voicemail diversions: *#61# Check divert when unanswered *#62# Check divert when unreachable *#67# Check divert when busy

Maintaining a Permanent VPN connection

From  http://blog.degree.no/2011/10/permanent-vpn-connection-in-windows/ $ip = "some address or ip" $result = gwmi -query "SELECT * FROM Win32_PingStatus WHERE Address = '$ip'" if ($result.StatusCode -eq 0) { Write-Host "$ip is up." } else{ Write-Host "$ip is down." Write-Host "Disconnecting..." rasdial.exe xxxVPN /DISCONNECT Write-Host "Connecting..." rasdial.exe xxxVPN vpnUsername vpnPassword12345 }