if you are using this example below please use
"union all" in this case.
Since both selects will clearly give no doubles ...
just for performance ..
X
------------------------
"Oracle" <oracle@xxxxxxxxxxxx> wrote:
------------------------
>Hi,
>
>1, You could try this
> select * from emp where ename like 'SMI%'
>union
>select * from emp where ename is null;
>
>2, Good luck with your upgrade
>
>3, Get the 9i version of the book from Amazon
>http://www.amazon.com/exec/obidos/tg/detail/-/0072225211/qid=1043922652/sr=8-1/ref=sr_8_1/102-0855901-5996135?v=glance&s=books&n=507846
>
>
>
>Regards
>Chris Farmer
>
>
>
>
>
> HFBeh@xxxxxxxxxxx
>
> m.my To: "Oracle"
>
> cc:
>
> 30/01/2003 01:38 Subject: [oracle] Re: SQL
> Select statement
> Please respond to
>
> "Oracle"
>
>
>
>
>
>
>
>
>
>
>Hi Chris,
>
>1) Any other method if I don't want to use OR ?
>2) The version I am using is Oracle 7. It will be upgraded to Oracle 9i
>soon.
>3) Where to get the pdf version of the book?
>
>Thanks.
>
>Best Regards,
>- HF Beh -
>
>
>
> c.r.farmer@dorset
>
> -cc.gov.uk To: "Oracle"
>
> cc:
>
> 29/01/2003 06:00 Subject: [oracle] Re: SQL
>Select statement
> PM
>
> Please respond to
>
> "Oracle"
>
>
>
>
>
>
>
>
>Hi,
>
>1, Use "or" >>>
> select * from emp where ( ename like 'SMI%' OR ename is null )
>
>2, this works fine in Oracle 8.1.7
> select d.*,(select sum(sal) from emp e where e.deptno = d.deptno)
>from dept d;
>what version are you using ?
>3, There are many good books on the market but the one i couldn't do
>without is
> Oracle 8i complete reference by Kevin loney and George Koch
> get the one with the pdf version of the book on cd because it saves a
>heck of a lot of searching time.
>
>Regards
>Chris Farmer
>
>
>
>
> HFBeh@xxxxxxxxxxx
>
> m.my To: "Oracle"
>
> cc:
>
> 29/01/2003 09:34 Subject: [oracle] SQL
>Select statement
> Please respond to
>
> "Oracle"
>
>
>
>
>
>
>
>Hi,
>
>I am new to Oracle database. There are a few things that I need help.
>
>1) As we know, the LIKE operator in SQL statement will not return the field
>which is NULL.
> So, what can we do in order for the field which is NULL to be return?
>
>2) In SQL Server, it is possible to select a column using another SQL
>statement.
> Eg. select abc, (select sum(def) from B), ......
> I tested using Oracle SQLPlus, and keep getting the error message
>missing expression.
> How to accomplish this in Oracle?
>
>3) What is the best reference to look for to get started with Oracle
>database?
> Eg, how do we know what features are available in Oracle and how to
>use it (syntax).
>
>Thank you in advance for the help.
>
>Best Regards,
>- nicole -
>
>
>---
>Change your mail options at http://p2p.wrox.com/manager.asp or
>to unsubscribe send a blank email to %%email.unsub%%.
>
>
>
>
>
>
>---
>Change your mail options at http://p2p.wrox.com/manager.asp or
>to unsubscribe send a blank email to %%email.unsub%%.
>
>
>
>
>
>---
>Change your mail options at http://p2p.wrox.com/manager.asp or
>to unsubscribe send a blank email to %%email.unsub%%.
>
>
>
>
>
>
>---
>Change your mail options at http://p2p.wrox.com/manager.asp or
>to unsubscribe send a blank email to %%email.unsub%%.
>
---
Change your mail options at http://p2p.wrox.com/manager.asp or
to unsubscribe send a blank email to leave-oracle-1796914O@xxxxxxxxxxxxx
|