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 )

SQL Error: Argument data type date is invalid for argument 2 of dateadd function

You new to cast the complete column as an integer before you can use the dateadd function. That means the following code: ,dateadd(d, CONVERT(date, CASE WHEN fda.[Column1] != 0 THEN fda.[Column1] WHEN fda.[Column2] != 0 THEN bfda.[Column1] ELSE fda.[Column3] END ,114), CONVERT(date, fda.[Column3], 114)) AS [tdate] needs to be changed to the code below. Note the convert becomes cast.   …

RHCSA Questions & Answers Example Exam 2019

RHCSA-VM configuration: If you are preparing for the RHCSA Exam, then you may find these questions and answers useful. I will be going through the post to make sure everything is correctly formated.   you have been provided a virtual box named as serverX.example.com (hint:where X is your domain number) password for both virtual machine should be “Examplepw” serverX.example.com provided …

The most useful one liner commands on linux

Run the last command as root Currently mounted filesystem in a nice layout Execute a command at a given time Get you external IP address Quick access the ascii table Quickly rename a file Push the present directory to another directory that you can pop later Access very long commands easily Watch Network Service Activity in real time Create a …

The best guide for awk and sed

One of the best guides I have stumbled upon, trying to improve my data analytics knowledge is the data cleaner’s cookbook I won’t write a lot about the site as the site is self explanatory, but it is definitely the best awk, sed and regex guides I have found. This is useful for medium sized files. This guide can also …

How to create folders with subfolders in linux

You can create folders and subfolders in one command easily in linux. With mkdir you can create new folders folders on the same level are separated by commas ‘,’. To create several subfolder under a main folder, you need to add a forward slash after the first folder. The subfolder are enclosed in curly brackets. {}. folder1/{subfolder1,subfolder2} Remember: You might …