Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: ?retrive sql text from a stored proc

Re: ?retrive sql text from a stored proc

From: rob merritt <merritt.robert_at_spsd.sk.ca>
Date: 13 May 2002 21:44:15 -0700
Message-ID: <b6bf97d5.0205132044.4e04b7ad@posting.google.com>


On second look the driver would indicate as much. Any input on my question how do I get the actuall SQL from the stored proc?

"Vladimir M. Zakharychev" <bob_at_dpsp-yes.com> wrote in message news:<ab5l5f$kvd$1_at_babylon.agtel.net>...
> You are most certainly running an MS SQL Server db, not an Oracle one.
>
>
> --
> Vladimir Zakharychev (bob@dpsp-yes.com) http://www.dpsp-yes.com
> Dynamic PSP(tm) - the first true RAD toolkit for Oracle-based internet applications.
> All opinions are mine and do not necessarily go in line with those of my employer.
>
>
> "rob merritt" <merritt.robert_at_spsd.sk.ca> wrote in message
> news:b6bf97d5.0205032159.1d704e34_at_posting.google.com...
> > hi
> >
> >
> >
> > I am doing some consulting work for an k12 institution. The
> > provincial
> > edu department has a oracle db that is queryed buy this division via a
> > excel ss given to them buy the provincial edu. In the ss a sp is run
> > to retrive data
> > for one grade we were hoping to customize the query a bit to get more
> > demographics on all grades. can i get the text of a query that is run
> > thusly:
> > sqlStr = "dbo.up_s_batch_stats_EXCEL " & Val(Range("G8").Value)
> >
> > ie get the SELECT .... FROM... that is run by
> > dbo.up_s_batch_stats_EXCEL
> >
> >
> >
> > Sub batchStats()
> > On Error GoTo eh
> > 'If Format(Time, "HH:MM") >= Format("08:00", "HH:MM") And Format(Time,
> > "HH:MM") <= Format("17:00", "HH:MM") Then
> > ' MsgBox "This query can only be run before 8 AM or after 5 PM"
> > ' Exit Sub
> > 'End If
> >
> > Range("A2").Select
> > Dim sqlStr As String
> > sqlStr = "dbo.up_s_batch_stats_EXCEL " & Val(Range("G8").Value)
> >
> > With Selection.QueryTable
> > .Connection = _
> > "ODBC;DRIVER=SQL Server;SERVER=LTDBPRDCL;APP=Microsoft®
> > Query;DATABASE=cnv_ttl_prd;Trusted_Connection=Yes"
> > .Sql = sqlStr
> > .Refresh False
> > End With
> >
> > MsgBox "Data refreshed!"
> > Exit Sub
> > eh:
> > If Err.Number = 1004 Then
> > MsgBox "This query can only be run before 8 AM or after 5 PM"
> > Else
> > MsgBox Err.Number & " " & Err.Description
> > End If
> > End Sub
Received on Mon May 13 2002 - 23:44:15 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US