Jump to content


Photo
- - - - -

Using Oracle SQL "WITH Clause"


1 reply to this topic

#1 Vlodik Myslony

Vlodik Myslony

    Newbie

  • Members
  • Pip
  • 5 posts
  • Gender:Male
  • Location:Australia

Posted 21 August 2009 - 05:55 AM

Hi,
Has anyone succeeded in using the "WITH" Clause within your imbedded sql in ProIV.

I am currently using Proiv 6.2 on Oracle 10g.
The ProIV trace file shows the SQL being parsed correctly but proIV returns the old 366 Oracle SQL error.


SQL
WITH subquery_name AS (the aggregation SQL statement) SELECT (query naming subquery_name);
ENDSQL

#2 Richard Bassett

Richard Bassett

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 696 posts
  • Location:Rural France

Posted 21 August 2009 - 10:59 AM

I have never tried that, however, I would *guess* that there might well be a problem with PROIV not recognizing this as a SELECT statement at all because it doesn't actually start with "SELECT". It might just never have come up before and might be pretty easy for PROIV to fix.

I assume it works correctly (albeit with lower performance potentially) if you do it the old fashioned way repeating the aggregation subquery within the body of the select?
Nothing's as simple as you think



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users