By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,501 Members | 2,790 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,501 IT Pros & Developers. It's quick & easy.

Why does my SQL SELECT statement not work? "... missing expression"

P: 8
PROMPT:
List all columns of the warehouse table in ascending PK sequence.
Only list rows where the address ends in RD or ST

My Code:
Expand|Select|Wrap|Line Numbers
  1. SELECT *
  2. FROM warehouse 
  3. WHERE address like '%rd'
  4. OR WHERE address like '%st'
  5. ORDER BY whid ASC;
  6.  
'whid' is the primary key, is there another way to ORDER BY PK than by specifying the PK name?

Also, my error is
"Error at line 4:
ORA-00936: missing expression "
Apr 6 '13 #1

✓ answered by DannyMahoney

SOLVED:

Expand|Select|Wrap|Line Numbers
  1. SELECT * 
  2. FROM warehouse
  3. WHERE address like '%Rd'
  4. OR address like '%St'
  5. ORDER BY whid ASC;
  6.  

Share this Question
Share on Google+
1 Reply


P: 8
SOLVED:

Expand|Select|Wrap|Line Numbers
  1. SELECT * 
  2. FROM warehouse
  3. WHERE address like '%Rd'
  4. OR address like '%St'
  5. ORDER BY whid ASC;
  6.  
Apr 6 '13 #2

Post your reply

Sign in to post your reply or Sign up for a free account.