Friday, May 1, 2009

Inserting excel sheet data in to SQL Server 2005 database table

1. First of all see that you have the create permissions in that database.
2. If you have the Create Permissions, Go ahead otherwise get it from DBA
3. Try to create a temporary table with the column names of the excel sheet.

    Example:

create table Temp
(
Column1 datatype null/not null,
Column2 datatype null/not null,
Column3 datatype null/not null,
Column4 datatype null/not null,
……………………… ……… like on
)

4. After creating the Temporary table Insert the excel sheet with data in to the table.
INSERT INTO Temp
SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=C:\(NAME OF THE EXCEL SHEET).xls;HDR=YES;IMEX=1', 'SELECT * FROM [sheet1$]')
GO
5. Be sure that the sheet number of the excel sheet is mentioned correctly, here it is Sheet1 but It might be different in your excel sheet and save the excel sheet in C drive.

That's it you can see the excel sheet data in table Temp.

Caged Bird

I really came to know the feelings of a caged bird or a wild animal in zoo where they are given everything and anything in the world but it lacks some thing. Same is with me. Every month my bank account is recharged for me which I say is a big amount at this stage of my life and I work in a centrally air conditioned office where temperature never drops below 22 degrees but some thing is lacking. I never enjoyed my coffee as much as I did in my college canteen with my friends. I was never fed up using the computer as I was now. I never enjoyed sitting on this ergonomic chair than I did sitting idle at bay area in Vizag watching nothing but waves. I am well connected to the world through phone where I can call any part of the world absolutely free but never felt like calling anyone. I am fed up .fed up with anything and everything.

Coming to my life last week was full of learning experience to me about life. I myself surrendered to my manager and I took up new project which I was delaying for the last one year so that literally they can cut the resource as I will be handling two applications. I am in AMDO dept. which stands for Application Maintenance and Development Operations. I came to know what pressure can do with humans and how it yields results. One single word I speak with my manager after he speaks a lot with me “OK I WILL DO IT…MAIL ME THE DETAILS”. I never extended my conversation much more than this. Not even a Hi or at least a Bye.

OK I want to write a post on Human Infrastructure. Watch out for it and last thing my blog stats showed one day highest hits as 113. Donno who is watching me?

Fools Follow Rules

Today I was talking to one of my colleague, less colleague and more like a brother where he quoted this line fools follow rules. First of all I have a bad opinion about rules which I came across almost every part of my life and fed up with them. A perfect example of being fed up with them is having a professional look. In my school days we are asked or forced to wear mono color shirt, mono color trouser, a small tie rather I would say a thin tie and black shoes till Thursday and full white on Friday I donno why we wear full white on Friday like a nun. white shirt white trouser and white canvass shoe which I like it very much because I wear it only once in a week and my point here is I was forced to wear this type of attire and I developed a negative feeling towards that and now in my professional life it is very common for to people come in with nice shirt, cool trouser and formal shoe with in shirt. I like this format very much but since it is a rule or say company policy I do not want to follow it, though I like it. Alas fools follow rules.

Very busy in office working 14 hours I mean to say I am spending 14 hours in office either working or not, total 3 hours work out started weight training also and I should confess I would have been in good shape if I had a control over diet and my weekend food is of high calories one.

Gotta go…need to send some reports.

Am I busy???

I just have 30 minutes to scribble my thoughts. Think it’s been 10 days since I blogged it is not the matter of interest to type but I really do not have time to do so. Have been busy with coding part these days surprisingly both front end and back end and it involves business logic too though not a great deal to the other software guy but it is to me because I hardly remember when I coded a piece. OK let’s leave it aside.

Yesterday while I was in a discussion with one of my colleague, he said he is eagerly waiting for weekend. I immediately shoot out a question WHY? He said because it’s a weekend and I can relax and more to that he said I hate week days. That’s it I did not prolong my discussion with him and started thinking about it. Why we should wait for weekend. And there were days for me where I wanted the weekend to pass as soon as possible because I can be back to college, attend classes not for the sake of lectures but for the lighting our campus provides and much more than that every guy in the campus with heart will have a beat in the class if not in campus. I had one too. So, I can see her. That’s it. But I never thought this weekend’s will be golden days for me like golden drops in Bacardi bottle. I never thought these week days will be boring for me and there will be no colorful light on weekdays. Everything changed from college days was not at all interested in celebrating holi and I still remember holi celebrated in college 2 years ago where we had almost all the colors on our body, some games in beach and so called swimming in the beach and where we had eggs at one place to be hatched but they turned out the other way. Lucky chick’s they escaped otherwise who will raise them. No one hatched them but broke them in undergarments.

It’s quite a boring week and of course another day of well oiled machine and one thing according to the blog statistics lot of people around 75-100 are visiting my blog daily. I may not be satisfying all of them with my writings, so better comment me on some thing so that we can have that some thing interesting. No –isms. I miss you guys. Let me finish with one proverb

Health is Wealth.

When a Free-Left is not right and left

Last weekend I visited Bangalore, where I came across this situation. What I love most while driving is changing lanes with a sharp cut and crossing perpendicular road with a deep arc. I donno whether it is a perfect way to drive but I love the way I do it and it gives me a kick.

Naturally in the busy roads of Bangalore it is highly possible to have sharp cuts and highly impossible to have deep arcs, so I was having my most unusual way of driving on the roads. There came a cross road near indiranagar 100ft road at Sony Centre and I was about to join the 100ft road from one of the cross road with a red signal in front of me and no traffic police at the cross roads and anyways what I need is a free left and here it is just a left. I did not even notice any sign boards though I don’t care one if it is there. I wondered why people are to the left of the road with out taking free left, since it is none of my business I had my half usual way of driving like sharp cuts and took free left sorry just a left here. there started an incident which provoked me to scribble a post in my blog, I saw a traffic police asking me to stop the vehicle, In a normal day and my usual way of driving I would have easily escaped from his wide arms but it was my unusual way of driving so I stopped to pay 100 rupees as a bribe. at my shock and surprise he pointed me towards his S.I who is sitting on a white Pulsar 180c.c DTS-i with a high end mobile and a big bracelet to his hand and to all a pure kannadian asked me the papers to which I replied nothing an he took a book out and started writing challan but not before delivering a speech which every police does before giving a sign that he needs to be bribed with his hand in upper way like he is not asking for the bribe but we are teaching him to take the bribe even though he does not like it.

The above is not the main point in the story because every one and all might have faced this situation. My point is that I was really impressed by the way he explained why we should go in lane and not to switch the lanes suddenly which made me to think that I should not do that again for a few seconds while he was giving a class to me. Why we should follow the traffic rules and why foreigners are looking at us the other way to good and how important it is for a motorist to follow traffic rules? But all the effect that created on me vanished with in a flash of milliseconds when he asked for bribe. Leave it here.

Practice what you preach else stop to preach. In my life I came across lot of people who talk about moral and ethics where his intervention is not at all necessary to assess them. I never want to blame Indian traffic and Indians traffic sense who use the plain roads in zigzag way and complain about zigzag roads. People talk and praise about glassy American roads and blame Indian roads while spitting on Indian roads. Stop it. Stop even thinking this way. Stop, either praising or blaming. Stop saying about fairy use of toilets, while peeing roadside.

STOP THINKING, START ACTING

Another day of a well oiled machine

Today I had a hell of busy time. to begin with my daily routine got up late by quarter past noon and one of my junior and my friend (better call him like that by the way I have bonding with him and resemblance I see in him) Arun yeshashwi came to my room just to see me…ohhh God there are people in the world who care about me this way because I never take the pain to visit a person in person.. I will definitely call a person whom I wish say Hi even if he is in next door or at least next room...Slothnesss...Lazinesss... You have to excuse me for that… had a talk with him and went to have some thing of course that some thing is food. On a normal day like this we would have definitely visited some good restaurant and had right from soup to desserts, but days changed and my attitude towards food changed. we drove to the near by subway, had a foot long corn and peas shared between us with a diet coke each alas we are on diet boss and immediately ran to my office already I was late by one hour of course I will be late by 2 hours daily… fixed some tickets, next gym today’s variety cardio so did cycling for 90 minutes drove 27 kilo meters and shed 400 calories and I did not drove the rest 3 kilo meters because of personal reason boss., then came back to my cube after having a fruit plate of pine apple because negative calories. Of course it is very difficult to have pine apple daily man. It sucks you know. then again worked on tickets mean while my manager asked me do certification in .Net over coming months of course they reimburse if we serve the company for another year and I am not ready for that, came to room by 12.30 am. That’s it

The main motive of this posting is one of my friend nitin reddy passed away recently because of heart attack. God must be cruel and crazy. he is thin, slim and good looking and I saw him several times drinking juices as that is the place I often see him in my engineering days and he is a friend of my many friends like what we call a circle and we lost a link in that circle. I donno why but he is in my mind though not always but I remembered him couple of times and I am unable to digest he is no more in this world. I donno why tears do not flow through my cheeks when I am depressed and how can a man show his sorrow, sadness. What can I do for this guy and why do people die so early?

I have a lot to say but you know what I am not at all interested to type so see you ya some other time ..Ohhh these words doesn’t fit here…ok tomorrow we, roommates are going to have a lavish buffest at barbeque nation at 12 noon...Seats already booked. It is a small get together…probably my next posting will be on that. I promise you next time I will post some thing meaningful stuff and I will recruit a steno for this so that I can dictate. Please refer me some beautiful steno.

and one more thing well oiled machine is me,myself because I have the same routine as a oiled machine and that needs no explanation.

Unedited Content...Forgive if any mistakes.

Today suddenly one of my friends asked why I am not updating my blog. Brother I am not updating because No one is asking me to do the same. Lots and lots of thoughts came in to my mind that is worth blogging but I forget them once I sit in front my system. There are few reasons for this like I sit in front of the system for 10 hours a day or even more but I either do some work or watch a movie alas movies, either talk over phone or chat with some one and last one which is ever important to me sleeping. I sleep at least 10 hours a day it may be deep sleep or some thing like normal sleep. I will be on the bed with eyes closed at least for 10 hours. So where is the Time? Time?

I think no one is going to watch my blog but people are there who do watch. Good for me. there are many things to blog like few good restaurants’ which I visit them regularly or my work out schedule, how many calories I shed over that black treadmill for one hour daily, how many abs I do. What is the sub I had today? I think it is silly to say people what I do but this is after all my blog, I can fill the crap I think I can.

First of all my MS plans are in jeopardy as there is a issue running about H1-B.I donno how it is going to effect my plans but I think it may hurt me in future so thinking about MBA in new Zealand because new Zealand is nice place and I can have a good time over there. Of course this is what I thought about US once upon a time. I stress once upon a time. I got admit from UFL a good university definitely a nice one for MIS course but no aid no nothing need to pay complete 45k.Dollars boss and from USF a safe bet donno much about this university. Trusted this university based on frnds word. The thing I liked is USF is in a metropolitan city Tampa. Guys Google all the terms you do not know. Even my name also. Do you know one thing if a person is not in Google then he is no where in this world! One of my HR said when they receive a resume and are seriously considering that person then they will try to know much about the person and first thing they do is immediately Google the persons name and even in facebook and orkut too. I donno what they r going to find out in orkut and facebook? So keep your social networking sites profile neat. Just a precautionary.

I would like to start a sub category in my blog just to update my work out in gym not for any body sake just to keep track of the food I eat and calories I spend in the gym. Hmmm I am not exaggerating it but I lost 6 kilos over a period of 4 months. Easy gain. Hard lost. I am not going to specify my weight anyways and my waist size dropped over 3 inches to the ones I used to have in my college days.

And few last lines about my professional life. It is boring. I became a machine like nice oiled machine Monday to Friday room to office to room. Saturday, Sunday Do we have then in this year calendar. I never came across those days now a day. No chit chat no gossips. Nothing .nothing has became a part of my life. SR’s come I solve them and new SR’s come even before I solve the old ones. I am addicted to them. I want SR’s. They are not any kind of drugs boss. They are Service Requests. Work orders.

I will blog about my class mates in my next posts, but one post per one person at a time. Come on yaar. I spent 4 years with them. I will never ever forgot any one of them. So there are two things to watch out, my sub category saying about my daily work out and my classmates. Let’s make this place interesting. Come on Gussa Gussa. I need some Gussa Gussa.

p.s.: I did not edit the content of the blog once I typed because I had only ten minutes of time before I attend a status call at 9.30 pm or 10 am US time.