I’m going to write about SQL Unions. This is a really handy function that lets you join 2 or more tables into one big “uber-table”. The syntax is quite simple. It’s either Union or Union All. You would use these functions if you needed to join two (or more) tables that were the same structure but in completely separate databases. This is common in companies split into several businesses. The accounts or business package to…

"Merging tables with “Union” and “Union All”"# Category: Programming

I am writing this update from outdoors, enjoying a glorious spring day on a beautiful terrace in Rome. This is about the basic principles of select queries. Incidentally I will be using the “AdventureWorks” database, which is a demonstration database provided by Microsoft. You can download the install file from here Probably the largest portion of my future updates will be using functions in select queries, so it’s worth covering that now and getting this…

"The Basic Principles of Select Queries"Many times when we are working on a modelling problem using Microsoft Excel, we might be required to clear the sheet contents. For example, you are just starting out to solve a problem and need to clear the cells without deleting the whole sheet. Personally, I don’t prefer wasting time on taking my hands to the mouse and then press clear contents. A better option is to write use some already written VBA macro which…

"Clear The Active Worksheet With a Click of a Button"In this tutorial, I will show a similar kind of trick to generate a variant of Pascal Triangle which seems to be a mix of forward and backward triangles. I am going to show how the output will look like. VBA CODE

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
Sub pascal_variation() Workbooks("Experiment.xlsm").Activate Worksheets("prblm").Activate Dim n As Integer n = InputBox("Enter the Number for Triangle") Dim i As Integer Dim j As Integer For i = 1 To (n + 1) / 2 Step 1 For j = (n + 3 - 2 * i) / 2 To (n + 2 * i - 1) / 2 Step 1 'Print Space((n + 1 - 2 * i) / 2) + String(j, i) Cells(i, j).Select Cells(i, j).Value = 2 * i - 1 Next j Next i End Sub |

PITFALLS OF THIS CODE This code works perfectly for all numbers which are odd.For example, when you click the Generate Triangle button in the excel workbook provided with this tutorial, you should…

"How To Generate Pascal Triangle Variant Using VBA"MATLAB stands for MATrix LABoratory. It was designed to make matrix manipulation easy for scientific computations.According to Mathworks website,MATLAB is the high level interactive programming environment used by Millions of scientists, engineers, analytics professionals worldwide. Learning Octave & MATLAB are the best available tools for prototyping the algorithms of machine learning. This is what widely followed in Silicon valley as well. A lot of companies which work on artificial intelligence or machine learning algorithms first try…

"Analytics Using MATLAB and Octave-Free Learning Series– Introduction & Basic Functions"In this post I have written a program in Python which tries to find out the sum of all prime numbers below a number. I have implemented the solution in Python. This problem was originally posted on Project Euler and it asked to find the sum of all prime numbers below two Million. Seems exciting, right? Recently I have been experimenting with various problems related to prime numbers and trying to implement in Python. I…

"How to Find Sum of all Primes below a Number"Have you ever wondered how the apps you play in your smartphones work and how are they created? Ever thought how people create such amazing websites. I am sure that you must have given a thought about it at least once. Well the credit of all such applications goes to programming languages. But one gets confused on how to get started with these applications. Well if you are also are confused then this is the…

"9 Best Programming Languages To Learn"