Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> oracle 9.2 sql plus IF NULL

oracle 9.2 sql plus IF NULL

From: Colin W <jd009a9777_at_blueyonder.co.uk>
Date: 20 Feb 2004 00:49:38 -0800
Message-ID: <ac26acbd.0402200049.3baf2859@posting.google.com>


I am trying to write a select statement that will ask the user for a variable

table

Name number dept

John    1         acc
Iain    2         acc
Martin  3         sales
Bobby   4         IT

Select * from table

where dept = '&Input'

The user can key in the dept but if it is blank all records are display. How do I code this

Thanks in advance
Colin Received on Fri Feb 20 2004 - 02:49:38 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US