SQL error returned in VStudio but not in V4Rb
Ruslan Zasukhin
sunshine at public.kherson.ua
Sat Jun 7 11:51:00 CDT 2008
On 6/7/08 9:02 AM, "Balestrieri, John" <jbalestrieri at ap.org> wrote:
Hi John,
> Hello, the following error is returned from VStudio 3.5.2 when I try to
> execute the SQL attached to the bottom of this email:
>
> Error: Kernel error: 0x42508. In the SELECT clause you can use only fields
> listed in the GROUP BY and aggregative functions.
Correct.
This is required by SQL Standard.
This is often FAQ in fact, please search list archive of Valentina or
google.
---
> This SQL did not produce any errors in VStudio2 or V4Rb2 - versions 2
> through 2.5 beta, in late 2006.
We could make it more strict to follow SQL Standard.
> VStudio 3 is now balking on the command, while V4Rb version 3.5.2 still
> executes it without error and returns a valid Vcursor with a found record
> set.
Impossible because engine must be the same.
Can be only if your e.g. V4RB installation catch mess of dlls,
And in fact may work some old 2.5 dll.
I recommend you to trash vcomponents folder
/usr/local/lib/vcomponents
And install V4RB again.
Vstudio contains all DLLs inside of own folder, so all DLLs are new.
----
Now about query
Strange is that as I see, all your SELECTed fields, are mentioned in the
GROUP BY. Ivan, you see mistake? Or we have bug?
> SELECT
> Race.FIPSCode,
> Results.Party,
> Candidate.LastName,
> Candidate.FirstName,
> Candidate.MiddleName,
> Candidate.Junior,
> Candidate.UseJunior,
> Candidate.PoliticianID,
> Results.Incumbent,
> Results.Winner,
> Sum(Results.VoteCount) AS 'VoteTally',
> Sum(Race.PrecinctsReporting) AS 'PrecinctTally',
> Sum(Race.TotalPrecincts) AS 'PrecinctTotal'
>
> FROM
> Results,
> Candidate,
> Race
>
> WHERE
> Results.CandidateID = Candidate.CandidateID
> AND Race.RaceCountyID = Results.RaceCountyID
> AND Results.Meta_State = 'AZ' --State postal
> AND Race.OfficeID = 'S' --Office
> AND Race.FIPSCode = 0
>
> GROUP BY
> Race.FIPSCode,
> Results.Party,
> Candidate.LastName,
> Candidate.FirstName,
> Candidate.MiddleName,
> Candidate.Junior,
> Candidate.UseJunior,
> Candidate.PoliticianID,
> Results.Incumbent,
> Results.Winner
>
> ORDER BY
> VoteTally DESC
--
Best regards,
Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc
Valentina - Joining Worlds of Information
http://www.paradigmasoft.com
[I feel the need: the need for speed]
More information about the Valentina-studio
mailing list