DataSource Controls :: Sqlserver 2005, Distinct Query Result Options?

Jul 8, 2010

i need record with id 1 and 3 only how do i get in sql server 2005.(means distinct empcod onl.

View 3 Replies


Similar Messages:

DataSource Controls :: Difference Between Sqlserver 2005 And 2008?

May 18, 2010

Currently I am working in Sql server 2005. I do not know the Sql Server 2000 and Sql Server 2008. what is the difference between Sql server 2005 and 2008?

What is the Difference between Sql Server 2000 and Sql Server 2005

View 3 Replies

DataSource Controls :: Group By With No Repeated Data In Sqlserver 2005?

Jan 28, 2010

The below query produce the below output.

[code]...

select r.Name,c.Name,s.Name,(select count(p1.id)from profiles p1 where r.id=p1.religion and c.id=p1.caste and s.id=p1.subcaste and p1.Gender=1)as Male,(select count(p1.id)from profiles p1 where r.id=p1.religion and c.id=p1.caste and s.id=p1.subcaste and p1.Gender=2)as Female from religion r,profiles p,caste c,subcaste s where r.id=p.religion and c.id=p.caste and s.id=p.subcaste group by r.Name,c.Name,s.Name,r.id,c.id,s.id

View 3 Replies

DataSource Controls ::how To Install Microsoft Sqlserver 2005 / 2008 On Window 7 With X64 Bit

Mar 25, 2010

how to install microsoft sqlserver 2005 or 2008 on window 7 with x64 bit.It works perfectly on vista but on getting a new system which comes with window 7 and x64bit i was unable to load the software onit except my visual studio 2008.

View 1 Replies

DataSource Controls :: How To Write Exception In A Stored Procedure In Sqlserver 2005

Feb 18, 2010

give me a simple example to write an exception in stored procedure

View 2 Replies

DataSource Controls :: Sqlserver 2005 Database Hacked At Godaddy Hosting?

Apr 26, 2010

I have a web applicaton run at godaddy hosting and have a sqlserver 2005 database hosting also by godaddy .From 1 week My web site hacked , by putting a strange script at all my .ASPx and the same strange script at all my database row.after that I remove the permission and make only permission of view filesand after that yesterday my web site hacked again by the strange script??? but my files didn't hacked .I scaned all my web sites files with updated antiviruse and with malware application but they didn't find any thing

View 5 Replies

Security :: .select SQL Query That Returns Result Set Like SQL 2005

Apr 12, 2010

And I realise that a user/member can have mutlple roles.HOW Can I do a select SQL query that returns the result set like this (SQL 2005)

SELECT Roles FROM <tbl>
WHERE UserID = <GUID>
AND Roles IN ('AA','CC')

View 2 Replies

SQL Server :: Query To Return Conditional Counts Both Distinct And Non Distinct?

Sep 30, 2010

I have the following table structure:

[code]....

The following query returns the default recordset:

[code]....

View 4 Replies

DataSource Controls :: Write SQL Query Result To Label

Mar 22, 2010

I have the following code which writes to a Gridview:

[Code]....

Using the same methods of connecting to the database, how can I amend this code to write the result of a second query (which only returns a number) to a label?

View 11 Replies

DataSource Controls :: Not Getting The Expect Result Set From Query / Join Or Union?

Jan 27, 2010

i have a form that my i use to look up whether or not there is an email address in the database. i wrote a query with this basic structure:

select *

from table A, table B

where table A.email = "email" or table b = "email"

i though that would return all instances that the email occurred in either table. what i am getting back is a bunch of null or other unrelated records from table A with a matching email in table B. the thing is, these two tables primary key to join them. i thought i wouldnt need to do that though in this case.

here is the actually query i am using if it makes things more clear:

select lm.cemailaddr, lm.b1emailadd, b.emailaddr

View 4 Replies

DataSource Controls :: Result Is Fine When Fire Query Of Sysfiles?

Feb 12, 2011

When I run select *from sysfiles it gives below result.

fileid groupid size maxsize growth status perf
------ ------- ----------- ----------- ----------- ----------- -----------
1 1 1463328 -1 128 2 0
2 0 270120 -1 10 1048642 0

View 1 Replies

DataSource Controls :: SQl Query - Generate Another  Computed Column That Will Contail The Result Of GrandTotal/Total?

Jun 30, 2010

How do i generate another computed column that will contail the result of GrandTotal/Total,


where GrandTotal is another value comes from computed column and the Total would be the sum of the Total within SchedularID.

And thats what i have done so far: [Code]....

View 3 Replies

DataSource Controls :: Optimize My Sql Query In Sql 2005?

Mar 23, 2010

I am working on a project where in one SQL query i am using joins to fetch data from diffrent tables. The execution time of the query is 20 seconds for 80 rows on my local server. How can i optimize this.

View 3 Replies

DataSource Controls :: Update Query With Sql Server 2005?

May 2, 2010

I have select query like this :

[Code]....

View 2 Replies

Forms Data Controls :: Displaying Correct Result Inside DropDownList From LINQ Query Result

Jul 1, 2010

I have this ListView that has a Drop Down List.Everything works fine (I think/hope) except that the drop down list are not showing its result correctly.This is the code.

Front-End
[Code]....

The code behind consist of the page_load and the ItemDataBound
[Code]....

View 3 Replies

DataSource Controls :: How To Convert The Oracle Stored Procedure To Sqlserver 2005 Stored Procedure

Apr 2, 2010

This is surareddy. i nead some small clarification in the "Stored Procedure"

how to convert the oracle Stored Procedure to sqlserver2005/2008 Stored Procedure.

right now i am enhancing the project that project already developed the oracle Stored Procedure. now our company is using sqlserver 2005/2008.

how to convert the Oracle Stored Procedure to sqlserver 2005 Stored Procedure

View 4 Replies

DataSource Controls :: How To Write Query Using Pivot Logic In Sql Server 2005

Jan 7, 2010

i have a table for customer forecast which contains customer, week number and quantit as columns. now i need to write query and list the week as column for each customer and each cell should have a quantity. how to write query for this using pivot logic. i dont want to use cursor.

View 3 Replies

DataSource Controls :: Select Query Doesn't Work When Data Is Present In Arabic MS Sql 2005

Jan 26, 2010

This query does not return any record

[code]....

View 3 Replies

SQL Server :: How To Bring Distinct Result

Jan 5, 2011

I need to bring the distinct result in third columnBelow one is my sample table

[Code]....

View 19 Replies

DataSource Controls :: Using LINQ To Pull Out A Single Value From A Single Result Row Of A Join Query?

May 25, 2010

For context: First of all, I am new to LINQ, as I have been using SubSonic for quite some time now.

I have two tables, Users, and Affiliates. They both have a very typical schema. The FK that joins them is the UserId field, which is in the Affiliates table. I want to create a LINQ query that pulls the Username from the Users table using the AffiliateId value. The AffiliateId is a primary key of the Affiliates table.

I have tried to accomplish this using many variations of the following code:

[Code]....

In the above query, I expect to get a single row result set. However, I instead receive the entire table of results.

How can I make this work? I have yet to see an example or article out there to do what I am trying to do.

View 9 Replies

Linq To XML - Getting Correct Query Result, But It's Buried Deep In The Result Var?

Mar 1, 2011

I'm having a problem with my Linq to XML query. I'm getting the result data I want, but it's nested so deep that there must be a better way.Here is my XML:

[Code]....

I'm trying to get a list (simple string[]) of all Item IDs where Category Names contains "Other".Here is my Linq:

[Code]....

[Code]....

Here is a snapshot of my result from Visual Studio:The results I want are there ("item100", "item400", "item500"), but buried so deeply in the results var.

How can I get the query to return a simple

string[] = { "item100", "item400", "item500" }

View 4 Replies

DataSource Controls :: Linq Distinct Ip According To Day?

May 4, 2010

I'm trying the pull out a result that shows me how many visitors I have had each day.

My database looks like this.

[code]....

View 5 Replies

SQL Server :: Invalid Column Name Sqlserver 2005, Vb.net?

Sep 23, 2010

[Code]....

Complete error msg with the trace

[Code]....

Source File: C:UserssharmilaDocumentsVisual Studio 2008WebSitesWebSite16PostJobs.aspx.vb Line: 46 Stack Trace:

[Code]....

View 9 Replies

DataSource Controls :: Select Distinct With Where Clause Don't Work?

May 2, 2010

I'm using asp.net login on a SQL Database.

I have 12 users in my User tabel - one of the user I don't want to have in my select (the user is an admin).

I tried this:

[Code]....

I also tried:

WHERE (dbo.aspnet_Roles.RoleName <> 'Administrators')

Both time it took the user into the table....

If I instead try this

WHERE (dbo.aspnet_Roles.RoleName = 'Administrators')

I get only one row (as expected).

What is wrong with the above sql statement - why can't I get 11 users and not them all (12 users)?

View 3 Replies

DataSource Controls :: Select Distinct Field In LinqDataSource

Jun 3, 2010

<
asp:LinqDataSource
ID="LinqDataSourceSM"
runat="server"
ContextTypeName="SalesIntranetSolution.DataClasses.salesIntranetDataClassesDataContext"
OrderBy="reportTo"
Select="new (reportTo)"
TableName="cubeSalesRepRollups">
</asp:LinqDataSource>

Does somebody know how I can modify this LinqDataSource to select distinct records only?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved