Hassle with standard SQL queries

2001-09-26 Thread Tobias Bohlin
Howdy list! Get in trouble with: SELECT COUNT (DISTINCT V_CODE) FROM INVENTRY; - SYNTAX ERROR The SQL numeric functions that don't seem to work: COUNT MIN SUM Nesting doesn't seem to work either: SELECT P_CODE, P_DESCRIPT, PRICE FROM INVENTRY WHERE PRICE = (SELECT MAX(PRICE))

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

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