8/23/17

I want to meet God. :)

Its been so long.........
I have been looking someone to share my feelings as I was feeling so lonely really. Today one idea popup in mind that I have blog to talk… really!!!!
Yesterday I saw a movie dharamsankart mai. It was good movie. I like the idea of that movie.
I belive religion is nothing but a place, a feeling which gives peace to person and according to me it doesn’t come from brought up or by birth.it is a feeling from heart. Day before yesterday I got thinking that I want to meet God. :)
Someone asked me why!!!!!!!!!!!!
 than I said I just want to meet for nothing.

Then I started thinking should I ask something like some gift like happiness, money , life , health etc. my mind says yes one has to ask because that we have seen in movies , read in stories. But my heart says nothing really I just want to meet god once..................cont

2/16/17

Bravo ....

Being rolled into a coffin-like, narrow tube that makes loud, banging noises where you can't move a muscle is no one's idea of fun.


Only courageous people can do and I have done 

1/26/17

Success is a measure as decided by others. Satisfaction is a measure as decided by you.

Today I got message from my husband and it was forward phone message.the message is about conversation between vivekanand and his guru.the message is mentioned below. It’s interesting and  it's one of  the best message I have come across...

*1. Swami Vivekanand*:- I can’t find free time. Life has become hectic.
*Ramkrishna Paramahansa*:- Activity gets you busy. But productivity gets you free.

*2. Swami Vivekanand:-* Why has life become complicated now?
*Ramkrishna Paramahansa:-* Stop analyzing life... It makes it complicated. Just live it.

*3. Swami Vivekanand*:- Why are we then constantly unhappy?
*Ramkrishna Paramahansa:*- Worrying has become your habit. That’s why you are not happy.

*4. Swami Vivekanand:-* Why do good people always suffer?
*Ramkrishna Paramahansa*:- Diamond cannot be polished without friction. Gold cannot be purified without fire. Good people go through trials, but don’t suffer.
With that experience their life becomes better, not bitter.

*5. Swami Vivekanand:*- You mean to say such experience is useful?
*Ramkrishna Paramahansa*:- Yes. In every term, Experience is a hard teacher. She gives the test first and the lessons later.

*6. Swami Vivekanand:-* Because of so many problems, we don’t know where we are heading…
*Ramkrishna Paramahansa:-* If you look outside you will not know where you are heading. Look inside. Eyes provide sight. Heart provides the way.

*7. Swami Vivekanand:-* Does failure hurt more than moving in the right direction?
*Ramkrishna Paramahansa:*- Success is a measure as decided by others. Satisfaction is a measure as decided by you.


*8. Swami Vivekanand:*- In tough times, how do you stay motivated?
*Ramkrishna Paramahansa:*- Always look at how far you have come rather than how far you have to go. Always count your blessing, not what you are missing.

*9. Swami Vivekanand:-* What surprises you about people?
*Ramkrishna Paramahansa:*- When they suffer they ask, "why me?" When they prosper, they never ask "Why me?"

*10. Swami Vivekanand:-* How can I get the best out of life?
*Ramkrishna Paramahansa*:- Face your past without regret. Handle your present with confidence. Prepare for the future without fear.


*11. Swami Vivekanand:*- One last question. Sometimes I feel my prayers are not answered.
*Ramkrishna Paramahansa:*- There are no unanswered prayers. Keep the faith and drop the fear. Life is a mystery to solve, not a problem to resolve. Trust me. Life is wonderful if you know how to live.

Here I want to give emphasis to point number 7 that success cannot measure in terms of salary or position which you are holding on.

Seriously it like that because its my experience also. It does not depend on the any condition. There is not scale to measure success because for me . it is happiness and satisfaction. I have nothing much to write but I want to share this thought so enjoy….

9/22/16

“surname” mai kya raha hai

Ever since I joined job I never felt interest to writing a blog but today I want to write it because I read something very interesting and want to share it. It was about changing surname after marriage and let me tell you specifically, it is about “GIRLS” changing surname after marriage. This is fashion in india that after wedding, girl is supposed to change surname and should adept husband surname or family name.i think it should be on choice mean if you want than you can otherwise no need. Same thing asked twinkle Khanna and she said I married not branded.
Love the way she used word to say that
I am not being feminist here but I think it should be on choice rather than must do it kind of custom. its also depended on person that how they react towards it because I know some ladies who are happy to change not only there surname but also their name after marriage. So to all women “surname” mai kya raha hai (what is there in surname)

7/28/16

Is null,coalesce.Case ,union and union all

How to use Is null and coalesce and case statement to replace null value to something else in the table
Replacing NULL value using ISNULL() function: We are passing 2 parameters to IsNULL() function. If M.Name returns NULL, then 'No Manager' string is used as the replacement value.
SELECT E.Name as Employee, ISNULL(M.Name,'No Manager') as Manager
FROM tblEmployee E
LEFT JOIN tblEmployee M
ON E.ManagerID = M.EmployeeID

Replacing NULL value using CASE Statement:

SELECT E.Name as Employee, CASE WHEN M.Name IS NULL THEN 'No Manager' 
   ELSE M.Name 
END as Manager
FROM  tblEmployee E
LEFT JOIN tblEmployee M
ON   E.ManagerID = M.EmployeeID

Replacing NULL value using COALESCE() function: COALESCE() function, returns the first NON NULL value.

SELECT E.Name as Employee, COALESCE(M.Name, 'No Manager') as Manager
FROM tblEmployee E
LEFT JOIN tblEmployee M
ON E.ManagerID = M.EmployeeID
Differences between UNION and UNION ALL (Common Interview Question)
Union and union all used to combine result
From the output, it is very clear that, UNION removes duplicate rows, where as UNION ALL does not. When use UNION, to remove the duplicate rows, sql server has to to do a distinct sort, which is time consuming. For this reason, UNION ALL is much faster than UNION. 

JOINS and UNIONS are different things. However, this question is being asked very frequently now. UNION combines the result-set of two or more select queries into a single result-set which includes all the rows from all the queries in the union, where as JOINS, retrieve data from two or more tables based on logical relationships between the tables. In short, UNION combines rows from 2 or more tables, where JOINS combine columns from 2 or more table.

Awesome quotes said by apj abdul kalam

-Abdul Kalam

“Don’t take rest after your first victory because if you fail in second, more lips are waiting to say that your first victory was just luck.”
-Abdul Kalam

“Man needs difficulties in life because they are necessary to enjoy the success.”

“If you want to shine like a sun. First burn like a sun.”

-Abdul Kalam

7/27/16

How to foreign key in the two table.Check constraints

ALTER TABLE parentTable1 ADD FOREIGN KEY (parentTable1.Column)
REFERENCES Table2(table2.Column)
Few point- both table columns should have same data type with same length


I am not sure but i think foreign column can not have null value in parent table 


Check constraints

Check constraints is used to limit the Range of the value that can be entered a column. when adding graphically the we have to save table so that constraints will be there.

Unique  constraints

The UNIQUE constraint uniquely identifies each record in a database table.
The UNIQUE and PRIMARY KEY constraints both provide a guarantee for uniqueness for a column or set of columns.
A PRIMARY KEY constraint automatically has a UNIQUE constraint defined on it.Note that you can have many UNIQUE constraints per table, but only one PRIMARY KEY constraint per table.
there option for seed value which provide the starting value on column then there is option for auto increment also

How to get the last generated identity column value 

using SELECT SCOPE_IDENTITY() in the scope 

7/6/16

Linq Queries

           //1............Select Products
           // var products = from product in ProductList select product.Name;
           // var products = ProductList.Select(a => new Product { Name = a.Name, Code = a.Code }).ToList();



            //2............Exclude duplicates get Distinct.
           //   var products = ProductList.Select(p => p.Name).Distinct();
            ////var products = from product in ProductList
            ////               select product.Name.Distinct();

            //3.............where condition
            //var products = from product in ProductList
            //               where product.Name == "apple"
            //               select product.Name;

            //checks existence of a keyword
List temp = (List)from u in ProductList
                                   where u.Name.Contains("apple")
                                   select u;
//check records that start with the keyword
List temp = (List)from u in ProductList
                                   where u.Name.StartsWith("apple")
                                   select u;

//check record that end with the keyword
List temp = (List)from u in ProductList
                                   where u.Name.EndsWith("apple")
                                   select u;

how to create list of object

List cats = new List
{
    new Cat(){ Name = "Sylvester", Age=8 },
    new Cat(){ Name = "Whiskers", Age=2 },
    new Cat(){ Name = "Sasha", Age=14 }
};

6/15/16

How to bring two table from entity Framework

            var result = db.table1.Join(db.table2, r => r.Id, p => p.CountryId, (r, p) =>
                        new { r.Id, r.Name, p.CityId,p.CityName,p.CountryId });