Category Archives: SQL
The best tools for software development
Here is a list of tools I you when developing software and for the reason I use that tool. Of course there are many other tools that do similar things and that are preferred by other people. Try all different tools you find and see which meets your needs best. IDE Since I only develop […]
How to use the result of a stored procedure in a MSSQL query
This problem is one I faced several years ago, but today I remembered it and thought someone might need the solution. The problem was simple, I needed to use the result of a stored procedure in a query. The client had used a backend using MS SQL as data store, but couldn’t adjust the database […]

MsSQL having max(id) = id problem –> row_number partition
One problem I haven’t been able to solve in a satisfying way is to create a query that returns a full row based on an aggregate function. Suppose we have the following database schema: If you need to write a query that returns the most expensive book for each customer you probably would first write […]

Pass list or array as a parameter to a Sql query
Like most developers my first Sql query was something like: SELECT * FROM TABLE WHERE FIELD = ‘value’ Which is a good starting point to learn Sql. After some time, I combined programming and Sql together, and wrote something which most developers will recognize: rs.open "Select firstn* from Employees where lastname like ‘" & textbox1.Text […]

Login