Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Running multiple SQL Plus queries in PHP?

jtp51May 17 2004 — edited May 23 2004
SUMMARY:

I have a query that consists of multiple SQL statements that will work when I run them all together in SQL Plus.

ISSUE:

When I split them up, running each part seperately, I do not receive any results. However, if I leave in the semi-colon when trying to run them together in one large SQL query, I receive parsing and execution errors in PHP.

QUERY:


CREATE GLOBAL TEMPORARY TABLE tmp0074661 (groupid varchar2(8));
insert into tmp0074661 (SELECT distinct groupid from TAB_COLOR_PRODUCT
WHERE PRODUCTID in (select GROUPID from tab_color_subgroup where subnum = '0074661' and unitnum = '001')
and GROUPID LIKE '06%');

select a.segment, b.description, a.menu_pos, a.seg_order
from tab_color_segment a, tab_color_defs b
where b.id = a.segment and a.segment in ((SELECT groupid from tmp0074661)
MINUS
select distinct b.pagembr from tab_color_lpn a, tab_color_pagembr b where
a.segment in (select groupid from tmp0074661)
and b.lpn = a.lpn
and b.pgmbr_order = '001'
and b.pagembr in (select groupid from tmp0074661)
)
order by menu_pos, seg_order;


QUESTION

How can I run this statement in PHP?

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 20 2004
Added on May 17 2004
3 comments
2,003 views