niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Databases » MySQL
Invalid syntax with STD() function when more than one field is used in select query
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
Author Message
William Bronsema
*nix forums beginner


Joined: 20 Jul 2006
Posts: 2

PostPosted: Thu Jul 20, 2006 2:18 pm    Post subject: Invalid syntax with STD() function when more than one field is used in select query Reply with quote

Hello,

I am encountering a strange issue when using the STD function. On my local
development machine (MYSQL version 4.18-nt) I can run the following basic
SELECT query with no problems:

SELECT STD(`LAPSETIME`),UKEY FROM 4b3f91f64a19529a84dff4982c8a6bc5 GROUP BY
UKEY

When I test this query on my hosted production machine (MYSQL version
4.19-standard) that query results in an invalid syntax error:

"#1064 - You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near '(
`LAPSETIME` ) , UKEY FROM 4b3f91f64a19529a84dff4982c8a6bc5 GROUP BY UKEY
LIM' at line 1"

The query will work if I remove the UKEY field in the select:

SELECT STD(`LAPSETIME`) FROM 4b3f91f64a19529a84dff4982c8a6bc5

Any ideas?

Cheers,
Bill



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql@m.gmane.org
Back to top
William Bronsema
*nix forums beginner


Joined: 20 Jul 2006
Posts: 2

PostPosted: Fri Jul 21, 2006 12:14 pm    Post subject: RE: Invalid syntax with STD() function when more than one field is used in select query Reply with quote

Oops, the version numbers were 4.1.18-nt and 4.1.19-standard. I have tried
it now on the latest 4.1.20 version and still have the same problem.

Does anyone have any ideas? Is this a bug?

Cheers,
Bill



Quote:
-----Original Message-----
From: William Bronsema
Sent: Thursday, July 20, 2006 10:18 AM
To: mysql@lists.mysql.com
Subject: Invalid syntax with STD() function when more than one field is
used in select query

Hello,

I am encountering a strange issue when using the STD function. On my
local development machine (MYSQL version 4.18-nt) I can run the following
basic SELECT query with no problems:

SELECT STD(`LAPSETIME`),UKEY FROM 4b3f91f64a19529a84dff4982c8a6bc5 GROUP
BY UKEY

When I test this query on my hosted production machine (MYSQL version
4.19-standard) that query results in an invalid syntax error:

"#1064 - You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near
'( `LAPSETIME` ) , UKEY FROM 4b3f91f64a19529a84dff4982c8a6bc5 GROUP BY
UKEY
LIM' at line 1"

The query will work if I remove the UKEY field in the select:

SELECT STD(`LAPSETIME`) FROM 4b3f91f64a19529a84dff4982c8a6bc5

Any ideas?

Cheers,
Bill



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql@m.gmane.org
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
The time now is Sat Nov 22, 2008 8:21 pm | All times are GMT
navigation Forum index » Databases » MySQL
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Select statement Shamna Sybase 0 Mon Sep 17, 2007 6:03 am
No new posts Function Pointer Sikandar C 3 Fri Jul 21, 2006 1:23 pm
No new posts Very slow query Michael Sutter MySQL 0 Fri Jul 21, 2006 1:10 pm
No new posts Arbitrary function with parameter darknails@gmail.com C++ 2 Fri Jul 21, 2006 9:58 am
No new posts ECPG (usage of simple select statement) Jasbinder Bali PostgreSQL 0 Fri Jul 21, 2006 3:28 am

Loans | Credit Cards | Electrical Shops | Buy Playstation 3 | Free Ebooks
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1440s ][ Queries: 16 (0.0648s) ][ GZIP on - Debug on ]