Re: Still having problems.....!

From: Brian Inglis <Brian.dot.Inglis_at_SystematicSw.ab.ca>
Date: 2000/06/15
Message-ID: <qg3jks48ij6ogdev60uonjd84b7sb1u519_at_4ax.com>#1/1


On Fri, 26 May 2000 16:28:32 GMT, "Ray" <raymondsee_at_home.com> wrote:

>Hey ,
>I tried, but it gave me this error
>
>SQL> start remove_CC.sql
>from CreditCard C, Requires R, Payment P
> *
>ERROR at line 2:
>ORA-00933: SQL command not properly ended
>
>Thanks
>RAY
your sql was:

delete *
from CreditCard C, Requires R, Payment P where R.CC#=C.CC# AND
P.Payment#=R.Payment#
AND SYSDATE >= P.PayDate + 60 DAYS

and above error message shows oracle.

oracle does not allow multiple tables in delete from.

try:

delete from	CreditCard
	where	cc# in
	(
	select		C.cc#
		from
			CreditCard	C,
			Requires	R,
			Payment		P
		where
			P.paydate	<= trunc( sysdate ) - 60
		and	R.payment#	 = P.payment#
		and	C.cc#		 = R.cc# 
	)

ending with a ; on the last line or a / on the following line to execute the script.

Thanks. Take care, Brian Inglis Calgary, Alberta, Canada

-- 
Brian_Inglis_at_CSi.com 	(Brian dot Inglis at SystematicSw dot ab dot ca)
				use address above to reply
Received on Thu Jun 15 2000 - 00:00:00 CEST

Original text of this message