Here I like to share my views about the nice place named earth ; here I like to share my feelings towards a journey , named life :-) "Enjoy " is the biggest shout of my life!
Wednesday, December 24, 2008
SQL Insert with ' (quote)
Lets start from the scratch by creating a simple table, named Shippers.
CREATE TABLE Shippers
(
ShipperID int IDENTITY(1,1),
CompanyName nvarchar(50) ,
Phone nvarchar(50)
)
If we write an insert to insert the data to the Shippers table like this:
Insert into Shippers(CompanyName, Phone) values ('ABC' ,'888-999-9999')
There won't be any problem but if we try to insert some data having quotation e.g. here after word Rock there is one quote and Muscle word is inside the quote mark will create problem
Insert into Shippers(CompanyName, Phone) values ('Rock's 'Muscle'' ,'XXX-999-9999')
The error will be like this
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 's'.
Msg 105, Level 15, State 1, Line 1
Unclosed quotation mark after the character string ')
'.
Then we need to modify our query in the following way :
Insert into Shippers(CompanyName, Phone) values ('Rock''s ''Muscle''' ,'XXX-999-9999')
The simple funda is to put one additional quote for every exisiting single quote i.e. after word Rock instead of one there will be 2 quotes as shown in the above query and so on.
Happy querying and advanced Merry X-MAS :-)
Friday, December 12, 2008
Subjunctive Mood ; try to write better English
English verbs have four moods: indicative, imperative, subjunctive, and infinitive.
Mood is the form of the verb that shows the mode or manner in which a thought is expressed.
I've seen in some grammar books instead of infinitive author included interrogative mood as one of the four moods.
I'll like to succinct here only the subjunctive mood only but for a brief refernce to all other along with Subjunctive, reader can check the following link:
http://www.dailywritingtips.com/english-grammar-101-verb-mood/
Defination:
A verb is in the subjunctive mood when it expresses a condition which is doubtful or not factual.
It is typically observed in a subordinate clause beginning with the word if.
It is also found in clauses following a verb that expresses a doubt, a wish, regret, request, demand, or proposal.
Some verbs those are followed by clauses that take the subjunctive:
ask, demand, determine, insist, move, order, pray, prefer, recommend, regret, request, require, suggest, and wish.
Prior to start discussion let us put two sentences:
Examples:
- I was in your position two years ago. (not in the subjunctive mood)
- If I were in your position, I would do the same. (subjunctive mood)
The subjunctive for the present tense third person singular drops the -s or -es so that it looks and sounds like the present tense for everything else.
The subjunctive mood of the verb to be is be in the present tense and were in the past tense, regardless of what the subject is.
Incorrect: If I was you, I would run.
Correct: If I were you, I would run. (The verb follows if and expresses a non-factual condition.)
Incorrect: I wish he was able to type faster.
Correct: I wish he were able to type faster. (The second verb is in a clause following a verb expressing a wish. It also suggests a non-factual or doubtful condition.)
Incorrect: His requirement is that everyone is computer literate.
Correct: His requirement is that everyone be computer literate. (Subordinate clause follows main clause with a demand.)
Incorrect: He recommended that each driver reports his tips.
Correct: He recommended that each driver report his tips.
Sometimes we may use the conditional auxiliary verbs of could, should, or would to express the same sense.
Subjunctive:I wish he were kinder to me.
Conditional: I wish he would be kinder to me.
English has had a subjunctive mood since Old English times, but most of the functions of the old subjunctive have been taken over by auxiliary verbs like may and should, and the subjunctive survives only in very limited situations.
Tuesday, December 9, 2008
Best musical ad of 2008, according to me :-)
This limca ad is one of the best ad in 2008. This add soothes my mind whenever I feel disappointed, mentally pissed. On the other hand this add makes my mood ecstatic while I am enjoying. Enjoy the music and the freshness.
I really enjoy this, specially enjoy the music!!!
Sunday, December 7, 2008
To write better English: For , while , during -- how and when to use?
For - The preposition "for" is used to express how long something or someone is doing something.
"For" is used to state a period of time and is used with a noun/pronoun (or any other form of nouns) .
I have been driving my car for 3 hours.
The lady has been shouting for a long time.
The traffic has been bad for the last three days.
While - The preposition "while" is used to represent the length of time an action has been happening. "While" is used when speaking about 2 actions that are happing at the same time. The length of the action is not important.
"While" is used with a subject and a verb.
e.g.
While I was playing with my cat, my brother was doing her homework.
While we are playing cards, the music was playing.
My mother doesn't like the T. V. on while we are eating dinner.
During -The preposition "during" is used to represent the length of time of an action that is while the action is happening.
"During" is used with a noun/pronoun (or any other form of nouns) .
e.g.
I will be really busy during the week.
The girls were talking during the party.
The streetlights went out during the hurricane.
Tuesday, December 2, 2008
After Mumbai Terror, Politicians showed their true colors
Because this is the country where politicians even didn't show little bit of courtesy to a martyr like Sandeep Unnikrishnan.
On the other hand, Mukhtar Abbas Naqvi yesterday told that this tirade against the politician is only prevailed in the mind of some elitist people. As if the Mumbai terror is carrying very insignificant consequence to the whole nation. What he thinks about himself.
Had anyone watched the interview that Bilasrao Deshmukh given to defend himself on Monday?
Where reportes asking that why he had been accompanied by RGV he was laughling like a joker.
Shame on them.
Time has come to unite against the dirty f*****g Indian politicians, otherwise future will not forgive us!!!
If we stand for what we believe in, we can change the world !!
Friday, November 28, 2008
Mumbai Terror --- No cities of India is safe
I'm trying to view this from different angle. Few days ago Mr Raj Thakare of the same city shouted for the benefits of MARATHI and vandalized the city, that consequently tarnished the image of Mumbai. Now his follower can ask him where he is right now? Has he made any such comments that tells us that he like to carry a tirade against those terrorist with the same gusto?
Actually that is a root cause that tells you why India slowly but surely becomes a breeding ground of the terror.
Once again I hate to use the cliche "Politicians" ; they are responsible for this like most of the calamities that India has ever faced.
Still they can't able to form a stern National Security Policy over the country.
Common people will be killed, police will be killed while fighting, but nothing will happen.
I really don't know whether there will be any change of this.
Tuesday, October 28, 2008
Failed to access IIS metabse problem
For my project purpose I need to install VS.NET 2003 and as I've already already have VS.NET 2005 and VSTS 2008 in my system hence I need to uninstall them first and then install Visual Studios in ascending order of versions i.e. 2003 first, then 2005 and so on.
But after do all the installation while I had created a new virtual directory for my current project and trying to browase from inetmgr then I found the irritating error "Failed to access IIS Metabase problem"
First I again uninstall and then install IIS ---- but the problem still there.
Then as per the nature of the problem I think
The Possible Cause might be that when you install IIS AFTER .NET 2.0 framework, the rights of the ASPNET user had not been set correctly.
Then I do two things
1.Go to c:\Windows\System32\and after right clicking inetsrv folder I went to the security tab and add ASPNET user there and give the full right.
2. Run from the VS.NET 2005 command prompt
c:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis -i
Eventually the problem has solved
Ref:
http://support.microsoft.com/?kbid=267904
http://social.msdn.microsoft.com/Forums/en-US/asmxandxml/thread/f213cd49-0143-46a8-95cf-88c80d5d1d34/