Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle SQL - ORA-00936: missing expression (HELP)

Status
Not open for further replies.

dagnew

MIS
Jun 27, 2000
1
0
0
US
I have the following script and keep getting an Ora-009356 error. any help would be greatly welcomed.<br><br>Select A.TABLESPACE_NAME ,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Select&nbsp;&nbsp;Count(*)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;From DBA_TABLES&nbsp;&nbsp;B<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Where B.TABLESPACE_NAME = A.TABLESPACE_NAME<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;And B.OWNER&nbsp;&nbsp;= 'DATAHUT'),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;INITIAL_EXTENT<br>From DBA_TABLESPACES A<br><br>Error returned (either with worksheet or SqlPlus)<br><br>ORA-00936: missing expression
 
The query syntax is incorrect.&nbsp;&nbsp;Does this give the result you want?<br><br><FONT FACE=monospace><br>select&nbsp;&nbsp;&nbsp;a.tablespace_name,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;b.initial_extent,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;count(*)<br>from&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dba_tablespaces&nbsp;&nbsp;a,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dba_tables&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;b<br>where&nbsp;&nbsp;&nbsp;&nbsp;a.tablespace_name&nbsp;&nbsp;=&nbsp;&nbsp;b.tablespace_name<br>and&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;b.owner&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 'DATAHUT'<br>group by a.tablespace_name,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;b.initial_extent<br>/<br><br></font><br><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top