XSD validation for integer – How to allow empty values for integer while limiting value range (ILT)

19-06-2013 How to write XSD to validate an integer field so that only a range of values and empty tags are allowed. Example: I wanted to allow any value between -1 and 999 and also had to allow empty tags for my XML tag. Use of  nillable=”true” is not what you want for this.  This howContinue reading “XSD validation for integer – How to allow empty values for integer while limiting value range (ILT)”

ILT – How to find if two time frames overlap or collide?

14/06/2013 Let’s assume that time frame 1 starts from Start1 and ends on End1 (Time Frame 1 = Start1 – End1) Similarly Time frame 2 = Start2 – End 2 Time Frame 1 and Frame 2 Over Lap IF: Start1 <= End2 AND End1 >= Start2 Time Frames do not overlap IF: End2 < Start1Continue reading “ILT – How to find if two time frames overlap or collide?”

Where Vs Having In SQL

21-05-2012 The Having clause can only be used when you are using the group by phrase. When you are using the Group By phrase in a query, you can use the Having clause for pretty much everything you can do with the Where clause. But not vise versa. The where clause doesn’t support aggregate functionsContinue reading “Where Vs Having In SQL”

Using TimeStamp columns to keep track of database record versions

2011-10-07 // http://pagead2.googlesyndication.com/pagead/show_ads.js Timestamp is a value that is incremented by the database whenever an insert or update operation is performed. Even though the name Timestamp could be a bit misleading, this value has no relevance to a clock related time. This only shows a linear progression of time. For an example , it isContinue reading “Using TimeStamp columns to keep track of database record versions”