473,396 Members | 1,938 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,396 software developers and data experts.

Group by problem wirh MySQL 4

I'm using MySQL 4.0.13 and having problem with the following query. It
was ok prior MySQL 4.

select substring(SomeField,1,1) as Letter from sometable group by
Letter

I use this query to get the first character of some field to list
something like dictionary with only available characters. This query
returns one row with empty string. In MySQL 3 the query works as
expected. If I remove group by clause the query lists the first
character of value in <SomeField> of all records in <sometable>. Am I
doing something wrong?

Ersin.
Jul 19 '05 #1
0 1454

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: vbaspcppguy | last post by:
I cant seem to find a good sized group for mysql so I figured you guys that do PHP ought to be able to help. Problem is simple to explain, hard to figure out. Ive installed PHP and MySQL on my...
12
by: Google Mike | last post by:
You know, while working on my moonlight corporation's LAMP project at home this weekend, I couldn't help but wonder if people writing similar projects are solving similar problems with having to...
0
by: Ask Bjørn Hansen | last post by:
Hi, I am trying to control which element gets picked when I do a group by, but I can't figure out how to do it. First some example data: CREATE TABLE t ( id int not null primary key...
10
by: Randell D. | last post by:
Folks, I have a SELECT that returns with multiple records - It works when I have a LIMIT clause but when I try to include a GROUP BY clause, the select returns nothing (ie no records, no...
0
by: Ersin Basaran | last post by:
I'm using MySQL 4.0.13 and having problem with the following query. It was ok prior MySQL 4. select substring(SomeField,1,1) as Letter from sometable group by Letter I use this query to get...
0
by: Mikolaj J | last post by:
Witam, szukając w dokumentacji mysqla odpowiedzi na moje pytanie trafiłem na taki przykład: SELECT user, MAX(salary) as max_sel FROM tmp GROUP BY user HAVING max_sel = MAX(salary); I...
3
by: Wire | last post by:
Hello experts, I have a little group by problem, hope you can help me. I have a lot off records which I want to group by "HOUR(timefield)" example: 01-02-2005 13:28:00 25.0 01-02-2005 ...
5
by: Dave Smithz | last post by:
Hi there, Been working on an evolving DB program for a while now. Suddenly I have come across a situation where I need to update a table based on a group by query. For example, I have a table...
3
by: mamta19 | last post by:
Error: opertion is not allowed wirh referencing to closed application
0
bleurose
by: bleurose | last post by:
We have a modestly large MySQL application (about 10,000,000 rows spread over 40+ tables). Most of our queries are very small and fast (single table or two-table joins with good keys and indexes). ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
tracyyun
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...

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.