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 -> Re: How can I select an element that doesn't exists in a table?

Re: How can I select an element that doesn't exists in a table?

From: Charles Hooper <hooperc2000_at_yahoo.com>
Date: 13 Nov 2006 03:57:37 -0800
Message-ID: <1163419057.031976.269910@h54g2000cwb.googlegroups.com>


jose_luis_fdez_diaz wrote:
> Idem.
>
> Thanks in advance,
> Jose Luis.

I am not 100% sure what you are trying to accomplish.

Your can select from dual:
SELECT
  SYSDATE CURRENT_DATE
FROM
  DUAL; SELECT
  'Hello World'
FROM
  DUAL; You can select from a table, bringing along with it a text constant, and a date constant:
SELECT
  SID,
  SERIAL#,
  'User' TEXT_MESSAGE,
  SYSDATE CURRENT_DATE
FROM
  V$SESSION; If you are wanting to return a row, even when a matching value does not appear in the table, perform an outer join (left outer join) between a table containing the full list of values and the table of interest: SELECT
  SID,
  SERIAL#,
  'User' TEXT_MESSAGE,
  SYSDATE CURRENT_DATE
FROM
  V$SESSION S,
  MY_SESSION_HISTORY SH
WHERE
  SH.SID=S.SID(+); Charles Hooper
PC Support Specialist
K&M Machine-Fabricating, Inc. Received on Mon Nov 13 2006 - 05:57:37 CST

Original text of this message

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