Count Columns in a Table SQL


SELECT  count(*) from information_schema.columns where table_name='giveTableNameHere'
or
SELECT  count(*) FROM syscolumns WHERE   OBJECT_NAME(id) = 'giveTableNameHere'

here i given my tested query for counting columns in a particular Table in a DB

What is LINQ?

Language Integrated Query (LINQ), is a component released within the .NET 3.5 Framework. It is one of the most powerful features of .NET 3.5. It serves the purpose of querying objects.
LINQ comprises a series of operators, which are used to query, filter and project data in arrays, enumerable classes, relational databases and XML. In order to query data, the data needs to be encapsulated as an object. In case the data source is not an object, it first needs to be converted to an object in order for LINQ to query it.
LINQ has its own Query Processing Engine. The information returned by a LINQ query is a collection of in-memory object which may be enumerated.
The LINQ concept treats the data source as an Object, rather than a Database. So we may say, its an object that is queried. LINQ may query any type of data source, like:
  • LINQ querying SQL (MS SQL Server supported).
  • LINQ querying Datasets (Querying is possible on Datasets and DataTables)
  • LINQ querying ORM Solution
  • LINQ querying Objects (In-memory data may be queried)
  • LINQ querying XML (Querying is possible on XML data source

Question:

Could not load file or assembly 'System.Web.Extensions,
Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' 
or one of its dependencies. The system cannot find the file specified. 

solution:

1.Go to Add reference, Select System.Web.Extensions and install this to WebConfig.
and replace existing one in web config.

<compilation debug="true">
<assemblies>
<--replace instead of this -->
<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>


<--with this one-->


<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>


</assemblies>
</compilation>

how to remove project from tfs

how to  remove TFS related files From Solution:


Step 1: File -> Source Control -> Change Source Control and then unbind and/or disconnect all projects and the solution.

If this helped you, promote this click +1... Thanks

How To Use Self Join In Sql Server 

Self Join in SQL Server 2000/2005 helps in retrieving the records having some relation or similarity with other records in the same database table. A common example of employees table can do more clearly about the self join in sql. Self join in sql means joining the single table to itself. It creates the partial view of the single table and retrieves the related records. You can use aliases for the same table to set a self join between the single table and retrieve the records satisfying the condition in where clause.
For self join in sql you can try the following example:

Create table employees:
emp_id emp_name emp_manager_id
1 Vinoth

Null
2 Prabhu

1
3 Prabha 1
4 Saravanan 2
5 Babu

2
6 Muthu

5
7 Dinesh 5

Now to get the names of managers from the above single table you can use sub queries or simply the self join.

Self Join SQL Query to get the names of manager and employees:
select e1.emp_name 'manager',e2.emp_name 'employee'
from employees e1 join employees e2
on e1.emp_id=e2.emp_manager_id

Result:
manager employee
Vinoth

Prabhu

Vinoth

Prabha

Prabhu

Saravanan

Prabhu Babu


Babu

Muthu

Babu

Dinesh

Understanding the Self Join Example
In the above self join query, employees table is joined with itself using table aliases e1 and e2. This creates the two views of a single table.

from employees e1 join employees e2
on e1.emp_id=e2.emp_manager_id

Here e.emp_manager_id passes the manager id from the 2nd view to the first aliased e1 table to get the names of managers.
Breadcrumbs typically appear horizontally across the top of a web page, usually below title bars or headers. They provide links back to each previous page the user navigated through to get to the current page or—in hierarchical site structures—the parent pages of the current one. Breadcrumbs provide a trail for the user to follow back to the starting or entry point. A greater-than sign (>) often serves as hierarchy separator, although designers may use other glyphs (such as » or ›), as well as various graphical treatments.
Typical breadcrumbs look like this:
Home page > Section page > Subsection page
or
Home page >> Section page >> Subsection page

Types of breadcrumbs

There are three types of web breadcrumbs:
  • Path: path breadcrumbs are dynamic and show the path that the user has taken to arrive at a page.
  • Location: location breadcrumbs are static and show where the page is located in the website hierarchy.
  • Attribute: attribute breadcrumbs give information that categorizes the current page.