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: QUERY PROBLEM

RE: QUERY PROBLEM

From: Harvinder Singh <Harvinder.Singh_at_MetraTech.com>
Date: Fri, 19 Oct 2001 10:28:51 -0700
Message-ID: <F001.003B02BD.20011019103018@fatcity.com>

Actullay it sql server u can do like this inside the block:

declare @@dd int
select * from t_acc where id_acc=@@dd

AND now developer wants something similar in Oracle.......

-----Original Message-----
Sent: Friday, October 19, 2001 2:03 PM
To: Multiple recipients of list ORACLE-L

It depends on what you want to do with this. You need to have an into clause, so declare a variable and put one in. If you want to see the output, then use the dbms_ouput package to display it.

Harvinder Singh wrote:
>
> Hi,
>
> We need to write a query like this:
>
> declare
> dd number;
> begin
> select * from t_acc where id_acc=dd;
> end;
> /
>
> we r getting obvious error that INTO clause is missing........
> but we only need to run the query and get the result back.....
> How can we accomplish this.........
>
> Thanks
> -Harvinder
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Harvinder Singh
> INET: Harvinder.Singh_at_MetraTech.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).

-- 
Scott Canaan (srcdco_at_rit.edu)
(716) 475-7886
"Life is like a sewer, what you get out of it depends on what you put
into it" - Tom Lehrer
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Scott Canaan
  INET: srcdco_at_ritvax.isc.rit.edu

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: Harvinder Singh
  INET: Harvinder.Singh_at_MetraTech.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).
Received on Fri Oct 19 2001 - 12:28:51 CDT

Original text of this message

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