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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: View Help

RE: View Help

From: Mercadante, Thomas F <NDATFM_at_labor.state.ny.us>
Date: Wed, 01 Aug 2001 07:05:17 -0700
Message-ID: <F001.0035BC8C.20010801062633@fatcity.com>

Venkata,

the way to do this is to return the column you wish to use in the WHERE clause.

Example:
Create view v1 as select ename,empno,sal,deptno from emp;

Then, when you access the view, you can say:

select * from v1 where deptno={some value}

I do this all the time, and it works just fine.

hopw this helps.

Tom Mercadante
Oracle Certified Professional

-----Original Message-----
Sent: Wednesday, August 01, 2001 9:22 AM To: Multiple recipients of list ORACLE-L

Dear All,
Is it possible to create a view where I will pass the condition to the where clause dynamically.

eg)
Create view v1 as select ename,empno,sal from emp where deptno=:a

The value of 'a' I will pass the value dynamically when I do the select.

eg) select * from v1.
Now I'll pass the value say 20.

Is this possible

Any suggestions or workaround for this.

TIA Regards

Venkata

Get 250 color business cards for FREE!
http://businesscards.lycos.com/vp/fastpath/
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: C.S.Venkata Subramanian
  INET: csvenkata_at_lycos.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Mercadante, Thomas F
  INET: NDATFM_at_labor.state.ny.us
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Aug 01 2001 - 09:05:17 CDT

Original text of this message

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