Watch Cricket online live video streaming
http://livescores.cricketnirvana.com/
Wednesday, February 24, 2010
Thursday, February 18, 2010
Don't Worry be Happy..........
One day, the father of a very wealthy family took his son on a trip to the country with the express purpose of showing him how poor people live.
They spent a couple of days and nights on the farm of what would be considered a very poor family.
On their return from their trip, the father asked his son, 'How was the
trip?'
'It was great, Dad.'
'Did you see how poor people live?' the father asked.
'Oh yeah,' said the son.
'So, tell me, what did you learn from the trip?' asked the father
The son answered:
'I saw that we have one dog and they had four.
We have a pool that reaches to the middle of our garden and they have a creek that has no end.
We have imported lanterns in our garden and they have the stars at night.
Our patio reaches to the front yard and they have the whole horizon.
We have a small piece of land to live on and they have fields that go beyond our sight.
We have servants who serve us, but they serve others.
We buy our food, but they grow theirs.
We have walls around our property to protect us, they have friends to protect them.'
The boy's father was speechless.
Then his son added, 'Thanks Dad for showing me how poor we are.'
Isn't perspective a wonderful thing?
Makes you wonder what would happen if we all gave thanks for everything we have, instead of worrying about what we don't have.
Appreciate every single thing you have, especially your friends!
'Life is too short and friends are too few.'
Saturday, February 06, 2010
Delete Duplicate Records
___________________________________________________________
CREATE TABLE dbo.car_info
(
Car_Sl_No INT NOT NULL,
CarCompany NVARCHAR (max) NULL,
CarBodyType NVARCHAR (max) NULL,
CarName NVARCHAR (max) NULL,
EngineType NVARCHAR (max) NULL
)
GO
INSERT INTO dbo.car_info (Car_Sl_No, CarCompany, CarBodyType, CarName, EngineType)VALUES (1, 'Maruti ', 'small ', 'Maruti-800 ', 'petrol')
GO
INSERT INTO dbo.car_info (Car_Sl_No, CarCompany, CarBodyType, CarName, EngineType)
VALUES (2, 'Honda ', 'sedan ', 'City ', 'petrol')
GO
INSERT INTO dbo.car_info (Car_Sl_No, CarCompany, CarBodyType, CarName, EngineType)
VALUES (3, 'Maruti ', 'small ', 'Maruti-800 ', 'petrol')
GO
INSERT INTO dbo.car_info (Car_Sl_No, CarCompany, CarBodyType, CarName, EngineType)
VALUES (4, 'Maruti ', 'small ', 'Waganor Duo ', 'petrol')
GO
INSERT INTO dbo.car_info (Car_Sl_No, CarCompany, CarBodyType, CarName, EngineType)
VALUES (5, 'Honda ', 'sedan ', 'City ', 'petrol')
GO
INSERT INTO dbo.car_info (Car_Sl_No, CarCompany, CarBodyType, CarName, EngineType)
VALUES (6, 'TATA ', 'small ', 'indica ', 'diesel')
GO
INSERT INTO dbo.car_info (Car_Sl_No, CarCompany, CarBodyType, CarName, EngineType)
VALUES (7, 'Mahindra ', 'SUV ', 'Scorpio ', 'diesel')
GO
INSERT INTO dbo.car_info (Car_Sl_No, CarCompany, CarBodyType, CarName, EngineType)
VALUES (8, 'TATA ', 'SUV ', 'Sumo ', 'diesel')
GO
INSERT INTO dbo.car_info (Car_Sl_No, CarCompany, CarBodyType, CarName, EngineType)
VALUES (9, 'Maruti ', 'sedan ', 'SX4 ', 'petrol')
GO
INSERT INTO dbo.car_info (Car_Sl_No, CarCompany, CarBodyType, CarName, EngineType)
VALUES (10, 'Maruti ', 'sedan ', 'Swift-Dzire ', 'diesel')
GO
INSERT INTO dbo.car_info (Car_Sl_No, CarCompany, CarBodyType, CarName, EngineType)
VALUES (11, 'TATA ', 'small ', 'Nano ', 'petrol')
GO
______________________________________________________________________________
Delete duplicate records based on the company name only
delete from dbo.car_info
where exists
(select Car_Sl_No from dbo.car_info s
where s.CarCompany = dbo.car_info.CarCompany and s.Car_Sl_No < dbo.car_info.Car_Sl_No)
CREATE TABLE dbo.car_info
(
Car_Sl_No INT NOT NULL,
CarCompany NVARCHAR (max) NULL,
CarBodyType NVARCHAR (max) NULL,
CarName NVARCHAR (max) NULL,
EngineType NVARCHAR (max) NULL
)
GO
INSERT INTO dbo.car_info (Car_Sl_No, CarCompany, CarBodyType, CarName, EngineType)VALUES (1, 'Maruti ', 'small ', 'Maruti-800 ', 'petrol')
GO
INSERT INTO dbo.car_info (Car_Sl_No, CarCompany, CarBodyType, CarName, EngineType)
VALUES (2, 'Honda ', 'sedan ', 'City ', 'petrol')
GO
INSERT INTO dbo.car_info (Car_Sl_No, CarCompany, CarBodyType, CarName, EngineType)
VALUES (3, 'Maruti ', 'small ', 'Maruti-800 ', 'petrol')
GO
INSERT INTO dbo.car_info (Car_Sl_No, CarCompany, CarBodyType, CarName, EngineType)
VALUES (4, 'Maruti ', 'small ', 'Waganor Duo ', 'petrol')
GO
INSERT INTO dbo.car_info (Car_Sl_No, CarCompany, CarBodyType, CarName, EngineType)
VALUES (5, 'Honda ', 'sedan ', 'City ', 'petrol')
GO
INSERT INTO dbo.car_info (Car_Sl_No, CarCompany, CarBodyType, CarName, EngineType)
VALUES (6, 'TATA ', 'small ', 'indica ', 'diesel')
GO
INSERT INTO dbo.car_info (Car_Sl_No, CarCompany, CarBodyType, CarName, EngineType)
VALUES (7, 'Mahindra ', 'SUV ', 'Scorpio ', 'diesel')
GO
INSERT INTO dbo.car_info (Car_Sl_No, CarCompany, CarBodyType, CarName, EngineType)
VALUES (8, 'TATA ', 'SUV ', 'Sumo ', 'diesel')
GO
INSERT INTO dbo.car_info (Car_Sl_No, CarCompany, CarBodyType, CarName, EngineType)
VALUES (9, 'Maruti ', 'sedan ', 'SX4 ', 'petrol')
GO
INSERT INTO dbo.car_info (Car_Sl_No, CarCompany, CarBodyType, CarName, EngineType)
VALUES (10, 'Maruti ', 'sedan ', 'Swift-Dzire ', 'diesel')
GO
INSERT INTO dbo.car_info (Car_Sl_No, CarCompany, CarBodyType, CarName, EngineType)
VALUES (11, 'TATA ', 'small ', 'Nano ', 'petrol')
GO
______________________________________________________________________________
Delete duplicate records based on the company name only
delete from dbo.car_info
where exists
(select Car_Sl_No from dbo.car_info s
where s.CarCompany = dbo.car_info.CarCompany and s.Car_Sl_No < dbo.car_info.Car_Sl_No)
Monday, February 01, 2010
What is the difference between char,nchar,varchar and nvarchar
- nchar and nvarchar can store Unicode characters.
- char and varchar cannot store Unicode characters.
- char and nchar are fixed-length which will reserve storage space for number of characters you specify even if you don't use up all that space.
- varchar and nvarchar are variable-length which will only use up spaces for the characters you store. It will not reserve storage like char or nchar.
nchar and nvarchar will take up twice as much storage space, so it may be wise to use them only if you need Unicode support.
Thursday, January 21, 2010
Effort is important, but knowing where to make an effort makes all the difference!
A giant ship engine failed. The ship's owners tried one expert after another, but none of them could figure but how to fix the engine.
Then they brought in an old man who had been fixing ships since he was a young. He carried a large bag of tools with him, and when he arrived, he immediately went to work. He inspected the engine very carefully, top to bottom.
Two of the ship's owners were there, watching this man, hoping he would know what to do. After looking things over, the old man reached into his bag and pulled out a small hammer. He gently tapped something. Instantly, the engine lurched into life. He carefully put his hammer away. The engine was fixed!
A week later, the owners received a bill from the old man for ten thousand dollars.
"What?!" the owners exclaimed. "He hardly did anything!"
So they wrote the old man a note saying, "Please send us an itemized bill."
The man sent a bill that read:
Tapping with a hammer...... ......... ........ $ 2.00
Knowing where to tap.......... ......... ...... $ 9, 998.00
Sunday, November 29, 2009
Integration Services Videos (SQL Server 2008)
Use Integration Services videos to accomplish the following goals:
* Learn about the product and component technologies.
* See how to do various tasks.
* Discover related help topics that help you expand your knowledge of Integration Services.
Friday, November 27, 2009
How to create a computed column using SQL Server Management Studio?
How to create a computed column using SQL Server Management Studio?
Take the following steps to create a computed column using SQL Server Management Studio:
Take the following steps to create a computed column using SQL Server Management Studio:
- Run SQL Server Management Studio from Start > Programs > Microsoft SQL Server 2005 > SQL Server Management Studio.
- In the Connect to Server window, click the Connect button.
- In the Microsoft SQL Server Management Studio window, double-click the Databases folder.
- In the Microsoft SQL Server Management Studio window, double-click the required database. Here, the Axle database is being used.
- In the Microsoft SQL Server Management Studio window, double-click the Tables folder.
- In the Microsoft SQL Server Management Studio window, right-click the required table and click Modify.
- Type the name of the new column. Here, Amount is the new column.
- In Column Properties, expand Computed Column Specification. In the Formula box, type the formula. Here, the Price column is multiplied by the Quantity column.
- Go to the File menu and click Save Products to save the modifications in the Products table.
What are the conditions under which a function can be schema bound?
What are the conditions under which a function can be schema bound?
A function can be schema bound only if the following conditions are true:
A function can be schema bound only if the following conditions are true:
- The function is a Transact-SQL function.
- The user-defined functions and the views it references are also schema-bound.
- The objects that the function references are referenced using a two-part name.
- The function and the objects it references belong to the same database.
- The user who executed the CREATE FUNCTION statement has REFERENCES permission on the database objects that the function references.
- SCHEMABINDING cannot be specified for functions that reference alias data types or CLR functions.
Friday, November 20, 2009
Wednesday, November 18, 2009
Attitude
An old man lived alone in a village.
He wanted to spade his potato garden, but it was very hard work.
His only son, who would have helped him, was in prison.
The old man wrote a letter to his son and mentioned his situation:
Dear Son,
I am feeling pretty bad because it looks like I won't be able to plant my potato garden this year.
I hate to miss doing the garden, because your mother always loved planting time.
I'm just getting too old to be digging up a garden plot.
If you were here, all my troubles would be over.
I know you would dig the plot for me, if you weren't in prison.
Love,
Dad
Shortly the old man received this telegram:
"For Heaven's sake, Dad, don't dig up the garden!! That's where I buried the GUNS!!"
At 4 a.m the next morning, a dozen FBI agents and local police officers showed up and dug up the entire garden without finding any guns.
Confused, the old man wrote another note to his son telling him what happened, and asked him what to do next.
His son's reply was:
"Go ahead and plant your potatoes, Dad.. It's the best I could do for you from here."
Moral:
"NO MATTER WHERE YOU ARE IN THE WORLD,
IF YOU HAVE DECIDED TO DO SOMETHING DEEP FROM YOUR HEART YOU CAN DO IT. IT IS THE THOUGHT THAT MATTERS.. NOT WHERE YOU ARE OR WHERE THE PERSON IS"
Sunday, November 15, 2009
Friday, November 06, 2009
Install multiple versions of IE on your PC
Install multiple versions of IE on your PC
Ever wanted to test your website in various versions of Internet Explorer?
Every time you install a newer version of Internet Explorer, Windows has a tendency to overwrite previous versions. And generally, that's a good thing. You're missing out on an awful lot if you're using Internet Explorer 3 to browse the web these days. AJAX, Flash, and other newfangled features just aren't going to work as well, or at all.
But if you're a developer and you want to see how your website looks to someone running an ancient browser, you might want to install an old copy of Internet Explorer alongside your IE7. And it turns out that this is completely doable if a little complicated. You need to alter some settings, redirect some DLLs, and rename a few things here and there.
If you have a PC running Windows XP (it doesn't work for Vista) and you want to test your application in multiple versions of Internet Explorer, you need to install this software.
Thursday, November 05, 2009
sql server Xquery Samples
./author
Allelements within the current context. Note that this is equivalent to the expression in the next row.
author
Allelements within the current context.
first.name
Allelements within the current context.
etc....
check below
XPath Examples expressions
All
author
All
first.name
All
etc....
check below
XPath Examples expressions
XML structure
Key terminology
The material in this section is based on the XML Specification. This is not an exhaustive list of all the constructs which appear in XML; it provides an introduction to the key constructs most often encountered in day-to-day use.
(Unicode) Character
By definition, an XML document is a string of characters. Almost every legal Unicode character may appear in an XML document.
Processor and Application
Software which processes an XML document. It is expected that a processor works in the service of an application. There are certain very specific requirements about what an XML processor must do and not do, but none as to the behavior of the application. The processor (as the specification calls it) is often referred to colloquially as an XML parser.
Markup and Content
The characters which make up an XML document are divided into markup and content. Markup and content may be distinguished by the application of simple syntactic rules. All strings which constitute markup either begin with the character "<" and end with a ">", or begin with the character "&" and end with a ";". Strings of characters which are not markup are content.
Tag
A markup construct that begins with "<" and ends with ">". Tags come in three flavors: start-tags, for example
Element
A logical component of a document which either begins with a start-tag and ends with a matching end-tag, or consists only of an empty-element tag. The characters between the start- and end-tags, if any, are the element's content, and may contain markup, including other elements, which are called child elements. An example of an element is
Attribute
A markup construct consisting of a name/value pair that exists within a start-tag or empty-element tag. In this example, the name of the attribute is "number" and the value is "3":

XML Declaration
XML documents may begin by declaring some information about themselves, as in the following example.
Sql Server Sample
Source
Save Web Page as pdf
Use PDF Download to do whatever you like with PDF files on the Web. Regain control and eliminate browser problems, view PDFs directly in Firefox as HTML, and use the all-new Web-to-PDF toolbar to save and share Web pages as high-quality PDF files.
Install Here
Execise Video DataBase
Execise Video DataBase
Learn Correct exercise technique
Exercise videos with tips and instructions
To get the maximum results out of any exercise you should use the correct technique. The best way to learn good technique is one on one, but since we can't get to every gym around the world we've got the next best thing, exercise instruction videos and pictures!
Each video is a demonstration of how to do the exercise using correct technique. There is also additional information, tips, pictures and links on the video pages to help you get the best results using the exercise. If you need help with any of these exercises just ask in the forum.
Source
Learn Correct exercise technique
Exercise videos with tips and instructions
To get the maximum results out of any exercise you should use the correct technique. The best way to learn good technique is one on one, but since we can't get to every gym around the world we've got the next best thing, exercise instruction videos and pictures!
Each video is a demonstration of how to do the exercise using correct technique. There is also additional information, tips, pictures and links on the video pages to help you get the best results using the exercise. If you need help with any of these exercises just ask in the forum.
Source
Wednesday, November 04, 2009
xquery xpath expressions
XQuery uses XPath expressions to locate nodes in a document and to navigate from one location to another within a single document or across documents. Navigation paths defined using XPath consist of a sequence of steps separated by /. A single step comprises an axis, a node test, and zero or more step qualifiers.
The axis specifies the direction of movement, relative to the context node. Supported axes in SQL Server 2005 are child, descendant, parent, attribute, self and descendant-or-self.
child : the children of the context node
descendant : all descendants (children, childrens children, ...)
parent : the parent (empty if at the root)
ancestor : all ancestors from the parent to the root
following-sibling : siblings to the right
preceding-sibling : siblings to the left
following : all following nodes in the document, excluding descendants
preceding : all preceding nodes in the document, excluding ancestors
attribute : the attributes of the context node
namespace : namespace declarations in the context node
self : the context node itself
descendant-or-self : the union of descendant and self
ancestor-or-self : the union of ancestor and self
The axis specifies the direction of movement, relative to the context node. Supported axes in SQL Server 2005 are child, descendant, parent, attribute, self and descendant-or-self.
child : the children of the context node
descendant : all descendants (children, childrens children, ...)
parent : the parent (empty if at the root)
ancestor : all ancestors from the parent to the root
following-sibling : siblings to the right
preceding-sibling : siblings to the left
following : all following nodes in the document, excluding descendants
preceding : all preceding nodes in the document, excluding ancestors
attribute : the attributes of the context node
namespace : namespace declarations in the context node
self : the context node itself
descendant-or-self : the union of descendant and self
Create,View,Edit PDF files Online
Edit PDF files with PDFescape - an online, free PDF reader, free PDF editor & free PDF form filler. View PDF documents on the web
Sub Query
The SQL subquery feature lets you use the results of one query as part of another query.
A subquery is a query within a query.
A sub-query is a SQL Server statement embedded inside of another SQL Server statement.
Sub-query execution is dependent upon the nesting level of the query. The execution tree goes from inner-most queries to outer-most queries. The higher nested queries can access the results returned by the lower nested queries.
Paranthesis
- A sub‐query must be enclosed in the parenthesis
- A sub‐query must be put in the right hand of the comparison operator
- A sub‐query cannot contain an ORDER‐BY clause
- A query can contain more than one sub‐query
- Sub Query
- Correlated Sub Query
- Single Row
- Multipe Row
- Multiple Columns
Correlated Sub Query Sample
A correlated sub-query is dependent upon the outer query. The outer query and the sub-query are related typically through a WHERE statement located in the sub-query. The way a correlated sub-query works is when a reference to the outer query is found in the sub-query, the outer query will be executed and the results returned to the sub-query. The sub-query is executed for every row that is selected by the outer query.
____________________________________________________
CREATE TABLE SalesHistory
(
SaleID INT IDENTITY(1,1),
Product VARCHAR(30),
SaleDate SMALLDATETIME,
SalePrice MONEY
)
SELECT SaleDate, Product, SalePrice,
ISNULL(
(
SELECT
SUM(SalePrice)
FROM
SalesHistory sh1
WHERE
Sh1.Product = sh.Product AND
Sh1.SaleID < sh.SaleID
),0) AS RunningTotal
FROM SalesHistory sh
ORDER BY Product, SaleID
____________________________________________________
Subscribe to:
Posts (Atom)
Popular Posts
|