Skip to main content

Posts

Showing posts from April, 2006

Lets start to think like a genius!!

Check out http://www.studygs.net/genius.htm Extract from that site: "Even if you're not a genius, you can use the same strategies as Aristotle and Einstein to harness the power of your creative mind and better manage your future." The following eight strategies encourage you to think productively, rather than reproductively, in order to arrive at solutions to problems. "These strategies are common to the thinking styles of creative geniuses in science, art, and industry throughout history." Let me try and think like a genius going forward :)

Using Notepad as your virtual diary ...

Whenever I get into an official call I used to open notepad and start to take notes. After few days if I open that notepad I used to wonder on which particular days call i took this note :) [Yeah sometimes I used to forget to type in the current date and time before starting take notes]. Few weeks back I got to know this interesting tip which I have explained below via my collegue. Step 1: Open notepad Step 2: Type .LOG as the first line of the file and press the carriage return [Enter key] Step 3: Save and close the file. Step 4: Double click on the file and open it ... you could notice that notepad appends the current datetime at the end of the file and places the cursor on the next line. Each and everytime you open the file it automatically appends the current datetime and places the cursor on the next line. Cool isn't it. This way one can make use of notepad as their virtual diary.

Sorting decimal values within a varchar field ...

Lets assume that you have data like '1.1.11', '1.1.3','4.1.2' etc within a column in a table. If you do Select * from TableName order by FieldName it won't give you the data in the correctly sorted order. Table Structure: Create table tblSortIndexNumbers ( sno int identity, IndexNumber varchar(100) ) Go Insert scripts for generating sample data within our test table: Insert into tblSortIndexNumbers values ('1.1.1') Insert into tblSortIndexNumbers values ('2.1.1') Insert into tblSortIndexNumbers values ('3.1.1') Insert into tblSortIndexNumbers values ('1.1.3') Insert into tblSortIndexNumbers values ('1.1.2') Insert into tblSortIndexNumbers values ('1.2.1') Insert into tblSortIndexNumbers values ('1.1.4') Insert into tblSortIndexNumbers values ('1.2.2') Insert into tblSortIndexNumbers values ('1.3.1') Insert into tblSortIndexNumbers values ('2.2.1') Go Now, try running the below sc