Mondial SQL Database Questions and Answers

You can find the Mondial SQL database here List all the countries that are part of Nato SELECT distinct c.name FROM Mondial.country c left join Mondial.isMember m on c.code = m.country where m.organization like ‘%nato%’; List all countries that are part of and organisation that was founded before 1960 SELECT * FROM Mondial.country c left join Mondial.isMember m on c.code …

SQL: Bulkinsert data FROM CSV or TXT File

Very useful for bulk inserting data rapidly from multiple files. At the moment with this sequence you will need to change the file manually. Still very useful. Make sure you check that no columns were imported accidentally.   BULK INSERT [Clientdatabase].[dbo].[journalentries] FROM ‘C:\Users\mxk\Desktop\Clientfolder\Rawdata\Clientdata.TXT’ WITH ( fieldterminator = ‘~’, rowterminator = ‘\n’, firstrow = 2, tablock )