Currently browsing

January 2013

Understanding NULLIF and ISNULL

Understanding NULLIF and ISNULL Introduction One of my friends wants to know about two functions NULLIF and ISNULL. In this article I am trying to discuss about that. Understanding NULLIF First we look at the syntax of the NULLIF The syntax is: NULLIF(Expression, Expression) Return type: Return type is the …

Copying Table with INDEX and CONSTRAINTS

Copying Table with INDEX and CONSTRAINTS Introduction When we are trying to copy a table (Structure only or with Data) we are unable to copy the Indexes, constraint with it. Can we copy Indexes and Constraint with Table structure in the same database? This article is related to it. General …

Dynamic SQL result stored in a TABLE

Dynamic SQL result stored in a TABLE Introduction As we all know that the dynamic SQL is not good where performance is concern. But sometimes we don’t have other choices. As I personally think that, no developer chooses the dynamic SQL with interest, but they choose it as they have …

IN EXISTS clause and their performance

“IN”, “EXISTS” clause and their performance Introduction To improve the performance of the Query, the general guideline is not to prefer the “IN” Clause. The guideline of the MS SQL query performance says that if we needs “IN” clause, instead of using “IN” clause we must use the “EXISTS” clause. …

Function in WHERE clause

Function in WHERE clause Introduction When we are using the function in the SELECT statement it returns data depends on the number of records retrieve by the select statement and what type of value is passed in the scalar function. The performance of the MS SQL Query is little bit …

Improve the performance by Execution Plan

Improve the performance by Execution Plan Introduction Developers ask a common quest “How to improve the performance of a SQL Query”. It is not so easy to answer as lot of factors is related to it. There are some general guidelines that we can follow to improve the overall performance …

The Transport Layer Security (TLS) Protocol v1.2

The Transport Layer Security (TLS) protocol provides communications security over the Internet. The protocol allows client/server applications to communicate in a way that is designed to prevent eavesdropping, tampering, or message forgery. 1. Introduction The primary goal of the TLS protocol is to provide privacy and data integrity between two communicating applications. The protocol is composed …

Accidental DELETE and UPDATE

Accidental DELETE and UPDATE Introduction Accidental DELETE and UPDATE?  Data loss… This article gives us a clear idea about it and what situation we can recover it. When we can recover 1.    If we perform DELETE and UPDATION within       TRANSACTION a simple ROLLBACK        TRANSACTION can …

Make PDFs searchable

Make PDFs searchable pre { background-color:#444; white-space:pre-wrap; font-size:80%; padding:0px 6px; } I searched for a good way to make scanned documents searchable. Most newer scanning software already has some OCR built-in, but what about all the old documents? Using pdfsandwich and Tesseract, we recover the text from each page of …

Columns Without Data Type

Columns Without Data Type Introduction  “Can you make a table with CREATE TABLE statement, where there are 4 columns and 1 of   the columns  is without data type?” If we heard this above statement, we definitely think for 2 to 3 seconds. That the columns without data type? The …

Building PHP extensions with C the easy way

Here is an easy way to build a PHP extension with C++ and default PHP packages on a Ubuntu system. I use SWIG to wrap C++ code to the Zend API. When using loops and recursion intensively, porting a few functions to C++ can give you some extra power. First, …

sqlvariant

sql_variant Introduction Data type is a very important factor. Think about situations when we the developers are little bit confused related to data type and don’t actually know what type of data actually stores. To solve this type of data type related problem the MS SQL Server provides a special …

Create PDF invoices with HTML5 and PhantomJS

Create PDF invoices with HTML5 and PhantomJS pre { background-color:#444; white-space:pre-wrap; font-size:80%; padding:0px 6px; } Creating invoices in PDF is always a bit tricky: there are many libraries to create PDF documents with PHP, but most can’t handle complex layouts and require a lot of memory and CPU time. Things …