Hi All,
Could you please help me with writing a sql for counting number of times a varchar (1000) repeated in the table. I think I cannot use groupby/distinct etc.
Please give me an idea how I could do that if I want the output
such that each row is the varchar (distinct) and number times it repeated.
I was trying several things but it did not work :(
select tab1.varchar_co l , tab2.CNT from tab tab1 ( select count(*) from tab group by varchar_col) as tab2 ...
Thanks,
Raghu
3 3445
Hi, - SELECT
-
varchar_col, count(varchar_col) as cnt
-
FROM
-
tab1
-
GROUP BY
-
varchar_col;
should work.
Regards,
Bernd
Hi Bernd,
Thanks a lot for the reply.. i tried it but I am getting the error below.
I was wondering if we can user varchar in group by at all ?...
SQL1585N A system temporary table space with sufficient page size
does not exist.
Thanks,
Raghu
Hi,
your rows are to big for the 4K standard temp tablespace, where sorts etc. are to be done. Create a system temp. tablespace with 8K, maybe 16K size, as the error message says ("CREATE SYSTEM TEMPORARY TABLESPACE"). See also IBMs documentation at http://publib.boulder.ibm.com/infoce...n/t0005216.htm .
Regards,
Bernd
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Adam i Agnieszka Gasiorowski FNORD |
last post by:
I need help width formulating the most
effective (in terms of processing time)
SQL query to count all the "new"
documents in the repository, where "new" is
defined as "from 00:00:01 up to 23:59:59
today". My current query does not give me
satisfactory results, it creates a visible
delay in rendering of the main page of one of
the departments (Drugs) :8https://hyperreal.info >
site, see for yourself, notice the delay
|
by: Sunny K |
last post by:
Hi guys,
I have a field in my DB called EventDate as a DateTime field,
therefore it holds both the date and time together like this:
'2004-10-14 08:42:57.000'.
I need to add together all the times in this column for a particular
date range (BETWEEN).
Any suggestions will be great.
|
by: Glenn Cornish |
last post by:
I have 5 fields in a table into which numbers between 1 and 45 can be
entered. What I am having trouble with is being able to find out is how
many times a particular number appears, regardless of which of the 5 fields
it was entered into. Can anyone suggest a remedy for this.
Many Thanks
Glenn
|
by: Megan |
last post by:
hi everybody-
i'm having a counting problem i hope you guys and gals could give me
some help with. i have a query that retrieves a bevy of information
from several different tables.
first let me give you a little background. this database is kind of
like a human resources database. it collects info about people, where
they work, and if they have any work-related issues where they work.
|
by: ChadDiesel |
last post by:
I appreciate the help on this group. I know I've posted a lot here the last
couple of weeks, but I was thrown into a database project at my work with
very little Access experience. No other employee knows anything about
Access. I've searched Google Groups, and that has been a lot of help, but
there are some questions that I just can't find the answer to. I'll try to
take it easy on the group after this question.
I have one more...
| |
by: sathyashrayan |
last post by:
Group,
Following function will check weather a bit
is set in the given variouble x.
int bit_count(long x)
{
int n = 0;
/*
** The loop will execute once for each bit of x
set,
|
by: n00m |
last post by:
http://www.spoj.pl/problems/SUMFOUR/
3
0 0 0 0
0 0 0 0
-1 -1 1 1
Answer for this input data is 33.
My solution for the problem is
======================================================================
|
by: Elfae |
last post by:
I have searched high and low for a sample for this, and I just can't
find any. Sorry for the length!
Background Information
The issue revolves around setting up a system-generated increase in
two of a three-part field - one numeric the other text. The Org
Number, Incremental Number, and Subcontractor Designation make up the
Audit Identification number(7) for queries and reports. There is a
hyphen between Org Number and Incremental...
|
by: neenaprasad |
last post by:
In the table the fields are id, first_name, last_name, introduced_by (which is integer value i.e., 1,2,3,4,5...). This number occurs more than once in the table. I have to count the number of times each number occurs(that means a single value for eg: 2) and sort it according to the count and display the output in ascending order..Can u help me?
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |