Home » SQL & PL/SQL » Client Tools » With clause gives strange error (Oracle9i,9.2.0.6.0,Windows XP)
With clause gives strange error [message #317625] Fri, 02 May 2008 03:54 Go to next message
rajatratewal
Messages: 507
Registered: March 2008
Location: INDIA
Senior Member
with summary as
(
  SELECT * FROM dual
)SELECT COUNT(1)  FROM summary


In Toad i get SQL statement does not return rows

In Sql* Plus when i run this query i get

SP2-0642: SQL*Plus internal error state 2091, context 0:0:0
Unsafe to proceed


Can somebody tell me what i am doing wrong.
Re: With clause gives strange error [message #317628 is a reply to message #317625] Fri, 02 May 2008 04:10 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
What is your client version?

It works for me on database 9.2.0.8 with client 10.2.0.3:
SQL> with summary as
  2  (
  3    SELECT * FROM dual
  4  )SELECT COUNT(1)  FROM summary;
  COUNT(1)
----------
         1

1 row selected.

Regards
Michel
Re: With clause gives strange error [message #317630 is a reply to message #317628] Fri, 02 May 2008 04:12 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
It also works with a client 9.2.0.8.

Regards
Michel
Re: With clause gives strange error [message #317633 is a reply to message #317630] Fri, 02 May 2008 04:21 Go to previous message
rajatratewal
Messages: 507
Registered: March 2008
Location: INDIA
Senior Member
Thanks i found the solution. I have both 8i and 10g client installed.

From 10g sql* plus i can execute this and this working fine.





Previous Topic: Edit HTML REPORTS
Next Topic: SP2-0158: unknown SET option "up"
Goto Forum:
  


Current Time: Sat Dec 03 03:52:27 CST 2016

Total time taken to generate the page: 0.05700 seconds