Re: Joining 2 Tables

2001-12-30 Thread Stephane Faroult
Pete Wang wrote: > > Hi all, > > I have been trying to get this right but to no avail. > > I have the following tables > > Table 1: Actual > > Pid, ccid, act > 1, 11011102, 798.88 > 2, 11011102, 666.79 > > Table 2: Budget > Pid, ccid, act > 1, 11011102, 672.02 > 2, 11011102, 40.30 > > I nee

RE: Joining 2 Tables

2001-12-30 Thread Khedr, Waleed
select act.ccid, act.total, nvl(bud.total,0) from (select ccid,sum(act) total from actual group by ccid) act, (select ccid,sum(bud) total from budget group by ccid) bud where act.ccid = bud.ccid (+) Regards, Waleed -Original Message- To: Multiple recipients of list ORACLE-L Sent: 12/

Joining 2 Tables

2001-12-30 Thread Pete Wang
Hi all, I have been trying to get this right but to no avail. I have the following tables Table 1: Actual Pid, ccid, act 1, 11011102, 798.88 2, 11011102, 666.79 Table 2: Budget Pid, ccid, act 1, 11011102, 672.02 2, 11011102, 40.30 I need to write an SQL to get the following result in one ro

Re: DDL alter in execute immediate pl/sql procedure - dynamic sql

2001-12-30 Thread Peter . McLarty
Hi If I am reading this right you are building a PL/SQL block and trying to do and execute immediate on this, you can biuld the bloc as normal anf then create strings of the actual SQL you need to execute and then EXECUTE MMEDIATE thestring Sometiung like this works PROCEDURE P_CALENDAR_UPDATE