Re: Hassle with standard SQL queries

2001-09-26 Thread Carl Troein


Tobias Bohlin writes:

 Get in trouble with:
 SELECT COUNT (DISTINCT V_CODE) FROM INVENTRY;
 - SYNTAX ERROR

Two errors in your query: MySQL doesn't allow you to
insert whitespace between the function name and the
parentheses, and you've misspelled inventory. :-o

//C

-- 
 Carl Troein - CĂ­rdan / Istari-PixelMagic - UIN 16353280
 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/
 Amiga user since '89, and damned proud of it too.


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Hassle with standard SQL queries

2001-09-26 Thread Ian Barwick

On Wednesday 26 September 2001 16:34, you wrote:
 Howdy list!

snip

 Nesting doesn't seem to work either:
 SELECT P_CODE, P_DESCRIPT, PRICE
 FROM INVENTRY
 WHERE PRICE = (SELECT MAX(PRICE))
 FROM INVENTRY);

 - syntax error
 This is really weird. Why do You think it can happen?

1. Fatal Bracket Mismatch On Standard SQL Syntax

2. General RTFM Error At Client

 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)

- http://www.mysql.com/doc/M/i/Missing_Sub-selects.html

;-)


Ian Barwick

-- 
Ian Barwick - Developer - [EMAIL PROTECTED]
akademie.de asp GmbH - http://www.akademie.de

To query tables in a MySQL database is more fun than eating spam

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php