+ 3

SQL limitations

Can SQL operate on tables created by excel/google sheets or only tables created in SQL?

28th Jan 2018, 9:17 PM
Mo Saleh
Mo Saleh - avatar
3 odpowiedzi
+ 4
It depends on which SQL server you use. You can import csv files in MySQL. LOAD DATA INFILE 'c:/dir/file.csv' INTO TABLE mytable FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 ROWS;
28th Jan 2018, 9:26 PM
Nicolas Poulain
Nicolas Poulain - avatar
+ 1
To expand on the previous answer a little, using Microsoft's SQL Server as an example (we use 2008 at work) you can import just about anything assuming you format it correctly. We have a proprietary database application that we dump the tables nightly and import into our SQL server as a read-only (relative to the proprietary application) backup for creating custom adhoc reports. we also import .csv files, .xlsx files (Excel), and even .txt (tab delimited), but the key word here is "import", while there may be a way of telling your SQL server to look elsewhere, I find it easiest (and the only way I personally know how) to just import the data into a SQL db and then query it as needed. And of course (like almost everything in IT) there are several ways to do this both manually and automatically via both the GUI and CLI. Hope this helps.
30th Jan 2018, 6:29 PM
Daffy Dubz
0
@Daffy Dubz Than you so much.
5th Feb 2018, 2:22 PM
Mo Saleh
Mo Saleh - avatar