Difference between revisions of "SQL Error Messages"

From SQLZOO
Jump to: navigation, search
 
(2 intermediate revisions by one user not shown)
Line 16: Line 16:
 
</ul><ul>
 
</ul><ul>
 
</ul><h2>SQL Server</h2><ul>
 
</ul><h2>SQL Server</h2><ul>
<li><a href='err918/sqlserver'>
+
<li> [[Ambigous column name |Msg 1013, Ambiguous column name 'name'.]]
Msg 1013,
+
</li>
Ambiguous column name 'name'.  
+
</a></li>
+
 
</ul><ul>
 
</ul><ul>
<li><a href='err934/sqlserver'>Msg 147 An aggregate may not appear in the WHERE clause unless it is in a subquery contained in a HAVING clause or a select list, and the column being aggregated is an outer reference. </a></li>
+
<li>[[Invalid Group function |Msg 147 An aggregate may not appear in the WHERE clause unless it is in a subquery contained in a HAVING clause or a select list, and the column being aggregated is an outer reference.]]</li>
 
</ul><ul>
 
</ul><ul>
 
</ul><ul>
 
</ul><ul>
<li><a href='err942/sqlserver'>Msg 208 Invalid object name 'noSuchTable'</a></li>
+
<li>[[Table doesn't exist |Msg 208 Invalid object name 'noSuchTable']]</li>
 
</ul><ul>
 
</ul><ul>
<li><a href='err979/sqlserver'>
+
<li> [[Incorrect GROUP BY |IMsg 8120 Column 'xxx' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause. (SQL-42000)]]</li>
Msg 8120
+
Column 'xxx' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause. (SQL-42000)</a></li>
+
 
</ul><h2>Oracle</h2><ul>
 
</ul><h2>Oracle</h2><ul>
<li><a href='err918/oracle'>ORA-00918: column ambiguously defined </a></li>
+
<li>[[Ambigous column name |ORA-00918: column ambiguously defined]]</li>
 
</ul><ul>
 
</ul><ul>
<li><a href='err934/oracle'>ORA-00934: group function is not allowed here</a></li>
+
<li>[[Invalid Group function |ORA-00934: group function is not allowed here]]</li>
 
</ul><ul>
 
</ul><ul>
<li><a href='err937/oracle'>ORA-00937: not a single-group group function</a></li>
+
<li>[[No Group By Function |ORA-00937: not a single-group group function]]</li>
 
</ul><ul>
 
</ul><ul>
<li><a href='err942/oracle'>ORA-00942: table or view does not exist</a></li>
+
<li>[[Table doesn't exist |ORA-00942: table or view does not exist]]</li>
 
</ul><ul>
 
</ul><ul>
<li><a href='err979/oracle'>ORA-00979: not a GROUP BY expression</a></li>
+
<li>[[Incorrect GROUP BY |ORA-00979: not a GROUP BY expression]]</li>
 
</ul><h2>DB2</h2><ul>
 
</ul><h2>DB2</h2><ul>
<li><a href='err918/db2'>
+
<li>[[Ambigous column name |SQL0203N A reference to column &quot;NAME&quot; is ambiguous. SQLSTATE=42702]]
SQL0203N A reference to column &quot;NAME&quot; is ambiguous. SQLSTATE=42702  
+
</li>
</a></li>
+
 
</ul><ul>
 
</ul><ul>
<li><a href='err934/db2'>SQL0120N A WHERE clause, GROUP BY clause, SET clause, or SET transition-variable statement contains a column function.
+
<li>[[Invalid Group function |SQL0120N A WHERE clause, GROUP BY clause, SET clause, or SET transition-variable statement contains a column function.]]</li>
</a></li>
+
 
</ul><ul>
 
</ul><ul>
 
</ul><ul>
 
</ul><ul>
<li><a href='err942/db2'>SQL0204N &quot;GISQ.NOSUCHTABLE&quot; is an undefined name</a></li>
+
<li>[[Table doesn't exist |SQL0204N &quot;GISQ.NOSUCHTABLE&quot; is an undefined name]]</li>
 
</ul><ul>
 
</ul><ul>
<li><a href='err979/db2'>SQL0119N An expression starting with &quot;xxx&quot; specified in a SELECT clause, HAVING clause, or ORDER BY clause is not specified in the GROUP BY clause or it is in a SELECT clause, HAVING clause, or ORDER BY clause with a column function and no GROUP BY clause is specified. SQLSTATE=42803</a></li>
+
<li>[[Incorrect GROUP BY |SQL0119N An expression starting with &quot;xxx&quot; specified in a SELECT clause, HAVING clause, or ORDER BY clause is not specified in the GROUP BY clause or it is in a SELECT clause, HAVING clause, or ORDER BY clause with a column function and no GROUP BY clause is specified. SQLSTATE=42803]]</li>
 
</ul><h2>Postgres</h2><ul>
 
</ul><h2>Postgres</h2><ul>
<li><a href='err918/postgres'>
+
<li>[[Ambigous column name |Error 7 ERROR: Column reference &quot;name&quot; is ambiguous]]</li>
Error 7
+
ERROR: Column reference &quot;name&quot; is ambiguous
+
</a></li>
+
 
</ul><ul>
 
</ul><ul>
<li><a href='err934/postgres'>ERROR: Aggregates not allowed in WHERE clause</a></li>
+
<li>[[Invalid Group function |ERROR: Aggregates not allowed in WHERE clause]]</li>
 
</ul><ul>
 
</ul><ul>
 
</ul><ul>
 
</ul><ul>
<li><a href='err942/postgres'>ERROR: Relation &quot;nosuchtable&quot; does not exist</a></li>
+
<li>[[Table doesn't exist |ERROR: Relation &quot;nosuchtable&quot; does not exist]]</li>
 
</ul><ul>
 
</ul><ul>
<li><a href='err979/postgres'>Error 7
+
<li>[[Incorrect GROUP BY |Error 7 ERROR: Attribute xxx.xxx must be GROUPed or used in an aggregate function]]</li>
ERROR: Attribute xxx.xxx must be GROUPed or used in an aggregate function</a></li>
+
 
</ul>
 
</ul>

Latest revision as of 12:18, 19 July 2012

Contents

Error Messages

Error messages, how they are caused and what can be done about them.

MySQL

SQL Server

Oracle

DB2

Postgres

Personal tools
Namespaces

Variants
Actions
Reference
Toolbox
Google AdSense