- Download and install “Visual C++ Redistributable for Visual Studio 2015”
https://www.microsoft.com/en-us/download/details.aspx?id=48145 - Download and install “Connector/ODBC”
https://dev.mysql.com/downloads/connector/odbc/ - After install finished, MySQL ODBC Driver will list at "ODBC Data Source Administrator"
- Setup "System DNS" at "ODBC Data Source Administrator".
Click "Add" button.
Select "MySQL ODBC 8.0 ANSI Driver
Fill in connection info - Create link server at Microsoft SQL Management Studio
- General
Provider: Microsoft OLE DB Provider for ODBC
Product: MySQL
Data source: same as "System DNS" - Security
Be made using the security context
- General
- Test script
- SELECT * from OPENQUERY (Linked_Server, 'select * from test.table');
- INSERT OPENQUERY (Linked_Server, 'select name,address from test.table') VALUES ('Jason','Malaysia');
- UPDATE OPENQUERY (Linked_Server, 'select name from test.table WHERE user_id = 0001') SET name = 'Tom';
- DELETE OPENQUERY (Linked_Server, 'select name from test.table WHERE user_id = 0002');
2018年8月24日 星期五
Create Link Server for MySQL at MSSQL
2018年8月7日 星期二
Convert GPS Location from DMS to DD via Excel
Sample for DMS
#Longitude: 99°51'05.2"E
#Latitude: 6°19'19.3"N
Sample for DD
#Longitude: 99.8514444444444
#Latitude: 6.32202777777778
Excel formulas
#Longitude (B2)
=(MID(B2,1,FIND("°",B2)-1)+(MID(B2,FIND("°",B2)+1,FIND("'",B2)-FIND("°",B2)-1)/60)+(MID(B2,FIND("'",B2)+1,FIND("""",B2)-FIND("'",B2)-1)/3600))*IF(OR(MID(B2,FIND("""",B2)+1,1)="E",MID(B2,FIND("""",B2)+1,1)="N"),1,-1)
#Latitude (D2)
=(MID(D2,1,FIND("°",D2)-1)+(MID(D2,FIND("°",D2)+1,FIND("'",D2)-FIND("°",D2)-1)/60)+(MID(D2,FIND("'",D2)+1,FIND("""",D2)-FIND("'",D2)-1)/3600))*IF(OR(MID(D2,FIND("""",D2)+1,1)="E",MID(D2,FIND("""",D2)+1,1)="N"),1,-1)
How to delete OEM partition with Diskpart
Step 1. Hit "Windows Key + R to open the run dialogue box, enter "diskpart" and click "OK" to open a black command prompt window.
Step 2. Type "list disk" to display all the disks of your computer. Type "select disk n" to identify which disk you need to work with. Here n stands for the disk letter.
Step 3. Type "list partition" to display all the volumes on the hard drive. Type "select partition n" to identify which partition you want to remove. Here n stands for the volume letter.
Step 4. Type "delete partition override" to remove the OEM partition. Finally, type "exit" to close the windows when you receive the message says, DiskPart successfully deleted the selected partition".
訂閱:
文章 (Atom)