The Last Non-Null Value Problem

I recently came across a problem with a query in Sql Server which I thought about sharing in my blog as this could be useful to many. Following is a summary of the problem. A similar problem is discussed in the Blog Entry First Non Null Puzzle by Itzik Ben-Gan. But my own problem had a little … Continue reading The Last Non-Null Value Problem

Cheat Code for Database Meta information : PostgreSql

In an earlier post we looked at the Queries for Sql Server for retrieving meta information. In this post, we will look at the PostgresSql version. Get All Views SELECT table_name, view_definition FROM information_schema.VIEWS WHERE table_schema = ANY ( Current_schemas(FALSE) ); Get All Tables SELECT table_name FROM information_schema.TABLES WHERE table_schema = ANY ( Current_schemas(FALSE) ) Get All … Continue reading Cheat Code for Database Meta information : PostgreSql

Cheat Code for Database Meta information : Sql Server

This post acts as a quick reference/Cheat code for anyone who would like to query the meta information about different entities in a database using Sql Server. Get all Views in the Database SELECT NAME, Object_definition (Object_id(NAME)) FROM sys.views Get All Tables in the Database SELECT NAME FROM sys.tables Get all columns from a table … Continue reading Cheat Code for Database Meta information : Sql Server

MongoDb 002 : CRUD – Part 1

We will continue with our exploration of MongoDb in this second part of tutorial, working our CRUD examples. Let's beging with the 'C'. In order to create a document, you would need to use, as you can guess, the Insert command. Notice that we are using a new collection named subject here. MongoDb would automatically … Continue reading MongoDb 002 : CRUD – Part 1

MongoDb 001 : Basic Commands

Before we actually get into MongoDb, let's begin by importing a Test Db. You can access the JSON file here. Once you have downloaded the file, use following command to import the document into mongodb. Let's break it down, the command tells you to import a file students.json into a database called testdb and collection … Continue reading MongoDb 001 : Basic Commands

Workaround for MySql 5.7 EF DbFirst Issue

Anyone working on .Net application with MySql 5.7 and EF in Db First Approach would have come across what is an officially confirmed bug.  This bug rises when you attempt to generate/update your Entity Model after changes to the Database. "Unable to generate the model because of the following exception: 'System.Data.StrongTypingException: The value for column … Continue reading Workaround for MySql 5.7 EF DbFirst Issue

Appending Strings and Parameters in Firebird.

One of the issues I recently faced while working with Firebird was how to use a string within a 'Execute Statement'. For example,   This throws an error. though the answer looked farely simple when done. You need to two Single Quotes. There might be another situation, when you need to append string based on … Continue reading Appending Strings and Parameters in Firebird.

Firebird 3.0 Issues

Migrating to Firebird 3.0 has been routine that caused more headache than expected. One of most common, yet pestering error was "Your user name and password are not defined". Interestingly, it worked perfectly fine when we were using the Firebird 4.10 Ado.net Nuget, however, the moment we update our Nuget package to 5.7, we are … Continue reading Firebird 3.0 Issues