473,414 Members | 1,989 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

facing problem in query

Is there any alternative for
select count(distinct column_name) from table1
Mar 7 '08 #1
1 1123
Stewart Ross
2,545 Expert Mod 2GB
Is there any alternative for
select count(distinct column_name) from table1
I am just guessing here as you have provided very little to go on. I suspect you need to count the number of rows for each group of items in column_name. If so, the SQL below may help:
Expand|Select|Wrap|Line Numbers
  1. SELECT [table1].[column_name], Count([table1].[column_name]) AS [Rows Counted]
  2. FROM [table1]
  3. GROUP BY [table1].[column_name];
-Stewart
Mar 7 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Jitendra Shinde | last post by:
I am facing a problem on Session. Firstly i am getting log in the application and woring with my some windows. now keeping that other window open and now from that main window i am logging...
0
by: John | last post by:
Internet Facing SQL Server, Login Security? How? I would think that our Project is fairly common. We're stuck on a security question. We have a typical SQL Server 2000, running under Windows...
2
by: Uma Abhyankar | last post by:
Hello, We are facing precision issues with addition, multiplication or division of "double" Issue1: ##### The output of 0.1 + 0.2 is not 0.3 It is 0.30000000000000004 How do we tackle this??
22
by: Rajshekhar | last post by:
Hi , i am writing a simple prgm to read a .txt file then store the contents into the array... program as follows: -------------------------- #include<stdio.h> int main() { FILE *fp1;
5
by: psbasha | last post by:
Hi, Currently I am using Active Python 2.4.2 IDLE.I am facing the following issue. - When I modify the code in different modules and execute the main module ,and if any error is coming in some...
3
by: yassinsearch | last post by:
Hi , I am facing problem text direction.(for HEBREW lanaguage) By default the direction of text field is Left to Rignt. Any SRW methods is available to set the reading direction from Right to...
2
by: RajSharma | last post by:
Hi, I am facing a problem regarding querying thru a large table having millions of rows....... Its hanging in between while querying for all those rows Can anybody suggest me a query regarding :...
0
by: Dhananjay | last post by:
hi all, I am facing problem in programming.Can anybody please let me know how to solve the problem. I have a link, clicking the link opens a page in which there are some data which is coming from...
0
by: Niks | last post by:
I am facing a very strange problem in my websevice which is working on socket communication. While i am publishing my webservice to the IIS and invoking a method, a data loss problem in occuring....
4
by: =?Utf-8?B?U3VoYXMgVmVuZ2lsYXQ=?= | last post by:
Hello, I am facing an issue while querying Active directory using C# code with system.DirectoryServices namespace. Here is the path for my LDAP - "LDAP://CN=XY - C++/Unix and other,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.