Wednesday, December 2, 2009

Problem with msaccess format function.(Regional Setting Datetime format)

Format function is just used to display the field's values in particular format.
so when u are using query for ms access and in where clause no need to put format function for date time field, no matter in regional setting which ever is format of date time.
example
select fieldname from table_name where datetime_field=some_condition
(no need to convert the datetime_field to any other format like mm/dd/yyyy or dd/mm/yyyy).
control on the form will by default take regional settings date time format.

Tuesday, October 27, 2009

How to Find Time Difference in VB 6

Private Sub gettimediff()
Dim m_time1 As String
Dim m_time2 As String
Dim m_diff As String
m_time1 = Format(Now, "hh:mm:ss")
m_time2 = DateAdd("h", 1, Format(Now, "hh:mm:ss"))
m_timediff = CStr(DateTime.DateDiff("H", m_time1, m_time2)) + "-" + CStr(DateTime.DateDiff("m", m_time1, m_time2)) + "-" + CStr(DateTime.DateDiff("s", m_time1, m_time2))
End Sub

Monday, October 12, 2009

TOUGH SQL QUESTION INTERVIEW QUESTION

What is the difference between group by and order by?
Group by controls the presentation of the rows, order by controls the presentation of the columns for the results of the SELECT statement.

Monday, August 31, 2009

MSACCESS --- ADD BOOLEAN(YES/NO,CONTROL)FIELD PROGRAMMATICALLY

Hello friends

Some times its a bit difficult to add columns in msaccess tables

Here is an example

How to alter msaccess table programmatically

Adding boolean(yes/no,control)field

Alter table add column bit

This will add control field or boolean field or yes/no field in msaccess table


MSACCESS --- HOW TO ADD IDENTITY COLUMN PROGRAMATICALLY

HELLO FRIENDS
SOME TIMES ITS A BIT DIFFICULT TO ADD COLUMNS IN MSACCESS TABLES
HERE IS AN EXAMPLE
HOW TO ALTER MSACCESS TABLE PROGRAMMATICALLY
ADDING IDENTITY COLUMN
ALTER TABLE ADD COUNTER

Friday, July 17, 2009

Crystal reports Running Total Problem's Solution

hello friends,
i got one solution for crystal reports.if values are not showing in crystal reports then do following
1.check
if the values is not nulll
if isnull(value) then
0
else
value
regards
enjoy making alll reports.
vijay

Monday, February 16, 2009

Give your self 100 %

A boy and a girl were playing together. The boy had a collection of marbles. The girl had some sweets with her. The boy told the girl that he will give her all his marbles in exchange for her sweets. The girl agreed.

The boy kept the biggest and the most beautiful marble aside and gave the rest to the girl. The girl gave him all her sweets as she had promised.

That night, the girl slept peacefully. But the boy couldn't sleep as he kept wondering if the girl had hidden some sweets from him the way he had hidden his best marble.

Moral of the story: If you don't give your hundred percent in a relationship, you'll always keep doubting if the other person has given his/her hundred percent.. This is applicable for any relationship like love, employer-employee relationship etc., Give your hundred percent to everything you do and sleep peacefully

Thursday, February 5, 2009

Corporate Baby

Different opinions according to Corporate World on Baby's Delivery..
1) Project Manager is a person who thinks nine women can deliver a baby in one month.
2) Developer is a person who thinks it will take 18 months to deliver a baby.
3) On-site Coordinator is one who thinks single woman can deliver nine babies in one month.
4) Client is the one who doesn't know why he wants a baby.
5) Marketing Manager is a person who thinks he can deliver a baby even if no man and woman are available.
6) Resource Optimization Team thinks they don't need a man or woman; They'll produce a child with zero resources.
7) Documentation Team thinks they don't care whether the child is delivered, they'll just document 9 months.
8) Quality Auditor is the person who is never happy with the PROCESS to produce a baby.

And lastly...

9) Tester is a person who always tells his wife that this is not the right baby.

Thursday, January 15, 2009

IT Designations in Heaven

Brahma
Systems Installation

Vishnu
Systems Administration & Support

Lakshmi
Finance and Accounts consultant

Saraswati
Training and Knowledge Management

Shiva
DBA (Crash Specialist)
Ganesh
Quality Assuarance & Documentation

Narada
Data transfer

Yama
Reorganization & Downsizing Consultant

Chitragupta
IDP & Personal Records

Apsaras
Downloadable Viruses

Devas
Mainframe Programmers

Surya
Solaris Administrator

Rakshasas
In house Hackers

Ravan
! ;Internet Explorer WWWF

Lakshman
Support Software and Backup

Hanuman
Linux/s390

Jatayu
Firewall

Dronacharya
System Programmer

Vishwamitra
Sr. Manager Projects

Valmiki
Technical Writer (Ramayana Sign off document)

Krishna
SDLC ( Sudarshan Wheel Development Life Cycle )

Arjun
Lead Programmer (all companies are vying for him)

Abhimanyu
Trainee Programmer

Draupadi
Motivation & Team building

Bhima
MAINFRAME LEGACY SYSTEM

Duryodhana
Microsoft product Written in VB

Karna
Contract programmer

Dhrutarashtra
Visual C++

Gandhari
Dreamweaver

100 Kauravas
Microsoft Service Packs and patches

Saturday, January 10, 2009

Simple Solutions

Many a times, be it at work front of in our personal lives, we find ourselves facing a lotsa problems and we just try to manage it some how or the other. In do so, we sometimes mismanage things instead of managing them. We get so engrossed with thr problem in our hands that we keep on focussing at it instead of focussing at the solution.
We forget the fact that simple things can do wonder in life. We should always try and focus on simple solutions to larger problems. For eg, incase of disputes twixt tow large companies I often see that people keep in fighting for no reason or just to satisfy their egos. And we keep talking bout the problems and consequences. Never do we try and find a solution to the problem. If both the parties agree that they have to get out of the rut as soon as possible, they will aim at finding a simple solution to the problem which shall be a win-win situation for both of them. Like the famous old song "tumhaari bhi jai jai, humaari bhi jai-jai….na tum haare na hum haaare" (sorry dont remember the name of the movie).
Focussing of simple solutions to larger problems can help you overcome dificultest of problems and not only in case of disputes. Problems between husband-wife, friends, or be it any other relationship can be sorted out if they all want it to be solved.
History has interesting examples to quote on the difference between focussing the problems and focussing on solutions which are nowadays taught in business schools as case studies.
One of the very interesting example is that of NASA trying to invent a pen that could work in zero gravity so that the astronauts can use in in space as no ball pen or inkpen works in zero gravity (ink doesnt flow in zero gravity). To solve this problem, it took them one decade and $12 million. They developed a pen that worked at zero gravity, upside down, underwater, in practically any surface including crystal and in a temperature range from below freezing to over 300 degrees C.
On the other hand, what did their Russian counterparts do?? They used a pencil. Now their lies the difference. The Americans foccused at the problem and tried to find out a pen that would work on the moon but the Russians focussed on the solution. They wanted something with which they can write in space. So they realised that they can use a pencil. They not only saved 12 million dollars but good 10 years of non-productive excercise.
Another memorable incident that happend in Japan was the case of the empty soapbox, which happened in one of Japan's biggest cosmetics companies. The company received a complaint that a consumer had bought a soapbox that was empty. Immediately the authorities isolated the problem to the assembly line, which transported all the packaged boxes of soap to the delivery department. For some reason, one soapbox went through the assembly line empty.
Management asked its engineers to solve the problem. Post-haste, the engineers worked hard to devise an X-ray machine with high-resolution monitors manned by two people to watch all the soapboxes that passed through the line to make sure they were not empty. No doubt, they worked hard and they worked fast but they spent a whoopee amount to do so.
But when a rank-and-file employee in a small company was posed with the same problem, he did not get into complications of X-rays, etc., but instead came out with another solution. He bought a strong industrial electric fan and pointed it at the assembly line. He switched the fan on, and as each soapbox passed the fan, it simply blew the empty boxes out of the line.
Moral : Always look for simple solutions.
Devise the simplest possible solution that solves the problems. Always Focus on solutions & not on problems. At the end of the day, what really matters is HOW ONE LOOKS AT THE PROBLEM…. Good perceptions can solve tough problems.

Job Performance Funda

* Employee "A" in a company walked up to his manager and asked what my job is for the day?
* The manager took "A" to the bank of a river and asked him to cross the river and reach the other side of the bank.
* "A" completed this task successfully and reported back to the manager about the completion of the task assigned. The manager smiled and said "GOOD JOB"

Next day Employee "B" reported to the same manager and asked him the job for the day. The manager assigned the same task as above to this person also.

* The Employee "B' before starting the task saw Employee "C" struggling in the river to reach the other side of the bank. He realized "C" has the same task.
* Now "B" not only crossed the river but also helped "C" to cross the river.
* "B" reported back to the manager and the manager smiled and said "VERY GOOD JOB"

The following day Employee "Q" reported to the same manager and asked him the job for the day. The manager assigned the same task again.

* Employee "Q" before starting the work did some home work and realized "A", "B" & "C" all has done this task before. He met them and understood how they performed.
* He realized that there is a need for a guide and training for doing this task.
* He sat first and wrote down the procedure for crossing the river, he documented the common mistakes people made, and tricks to do the task efficiently and effortlessly.
* Using the methodology he had written down he crossed the river and reported back to the manager along with documented procedure and training material.
* The manger said "Q" you have done an "EXCELLENT JOB".

The following day Employee "O' reported to the manager and asked him the job for the day. The manager assigned the same task again.

"O" studied the procedure written down by "Q" and sat and thought about the whole task.
He realized company is spending lot of money in getting this task completed. He decided not to cross the river, but sat and designed and implemented a bridge across the river and went back to his manager and said, "You no longer need to assign this task to any one".
The manager smiled and said "Outstanding job 'O'. I am very proud of you."
What is the difference between A, B, Q & O????????
Many a times in life we get tasks to be done at home, at office, at play.,
Most of us end up doing what is expected out of us. Do we feel happy? Most probably yes. We would be often disappointed when the recognition is not meeting our expectation.

Let us compare ourselves with "B". Helping some one else the problem often improves our own skills. There is an old proverb (I do not know the author) "learn to teach and teach to learn". From a company point of view "B" has demonstrated much better skills than "A" since one more task for the company is completed.

"Q" created knowledge base for the team. More often than not, we do the task assigned to us without checking history. Learning from other's mistake is the best way to improve efficiency. This knowledge creation for the team is of immense help. Re-usability reduces cost there by increases productivity of the team. "Q" demonstrated good "team-player" skills,

Now to the outstanding person, "O" made the task irrelevant; he created a Permanent Asset to the team.
If you notice B, Q and O all have demonstrated "team performance" over an above individual performance; they have also demonstrated a very invaluable characteristic known as "INITIATIVE".

Initiative pays of everywhere whether at work or at personal life. If you have initiative you will succeed. Initiative is a continual process and it never ends. This is because this year's achievement is next year's task. You cannot use the same success story every year.
The story provides an instance of performance, where as measurement needs to be spread across at least 6-12 months. Consequently performance should be consistent and evenly spread.
Out-of-Box thinkers are always premium and that is what every one constantly looks out for. Initiative, Out-of-Box thinking and commitment are the stepping stone to success.
Initiative should be life long. Think of out of the box.