Does PL SQL have a way to take a snapshot of the data and the script that captured the data? Like a viewer type tool you can send to someone?

Does PL SQL have a way to take a snapshot of the data and the script that captured the data? Kind of like the reader for Adobe PDF? (Obviously not connected to the DB?) I was looking at Packages but not sure if that is it. Sounds like it is close but not seeing a result set of records. Is there such a thing in existence or does anyone know if there is an Oracle tool or feature that does this? I was just thinking how useful it would be if you had a question about your script that if you could not only show the script but produce the result set of records it returned might be super helpful in solving problems. I apologize in advance for my ignorance. I googled it and did not see much that related. So back to the Experts...
Fletcher BurdineTableau Trainer & Consultant Sales Exec.Asked:
Who is Participating?
 
slightwv (䄆 Netminder) Commented:
There is no such tool in Oracle that provides a disconnected data set.  You can create a binary export of your sample data that someone could import into their Oracle database.

You can also spool out the data into a text file that many other programs can read.

If you were looking at Oracle Packages, that is a container for stored functions and procedures not data.
0
 
Fletcher BurdineTableau Trainer & Consultant Sales Exec.Author Commented:
My thought was to be able to show you the records returned from the query script entered. That way you could see the result set returned from the query and maybe see why it was bringing back the same records from the DB no matter whether I used the ' quotes around the number ' ... or not.

On another note. I believe you but always wonder if I should leave the question open a bit longer to see if someone knows of some new tool or maybe something out there new to the industry. Any thoughts on length of time to leave a question open when your not sure....(cause heck I would not know) if the question is complete or not? Thank you by the way. You guys are amazing to me. That's not fluff either....!
0
 
slightwv (䄆 Netminder) Commented:
Just copy/paste the data into a code block.  It is normally the best way.  Txt files a close second.

Really, anything except a picture.  Excel can be bad on raw data because it can mess with the data formatting.

For example from sqlplus (inside a code block, things tend to retain spacing):
SQL> select * from tab1;

  CUSTOMER C
---------- -
         1 a
         1 a
         1 a
         1 b
         1 c
         2 d

6 rows selected.

Open in new window


>>Any thoughts on length of time to leave a question open when your not sure....

Days?  Leave it open as long as you want (well, maybe not years).  The site is World Wide, people are on vacation or maybe just really busy.  It may take a day or five for the rest of the Experts to see it.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Geert GOracle dbaCommented:
a picture is for people
text, like a csv, is for a computer system to read

in the middle ... html output, or xml
it's text visually rendered by a browser

it's easier to write a csv based query system than to write a html query system
>> just read the csv as an external table via oracle ...
0
 
Mark GeerlingsDatabase AdministratorCommented:
I'm not aware of an Oracle tool that can give you: "a snapshot of the data and the script that captured the data".  But, it is not difficult to do this in Oracle.  SQL Plus, SQL Developer or TOAD can all be used to run queries, and they can all "spool" (that is: capture) the output to ASCII text files.  That output can include the query text also.

PL\SQL is Oracle's proprietary programming language for stored procedures, to add control or conditional logic to basic SQL commands.  That provides a system for writing stored procedures, but it doesn't deliver pre-built functionality like what you are asking for.

Packages in Oracle are just collections of PL\SQL code that is grouped together for functionality, management or security purposes.  Oracle incudes some in the database software itself, plus many applications include more of these.  It is possible that someone somewhere has written a PL\SQL package that delivers what you are asking for, but I haven't seen one like this.

Depending on which Oracle data you are interested in, and on how your application modifies data in Oracle, it may be possible to write simple SQL queries that return exactly the same results today, or a month from now or a year from now, etc.  For example if you have a customer table in your database, a query like this should return exactly the same results whenever you run it:

select customer_id, customer_name
from customers
where date_created < to_date('01/01/2018','MM/DD/YYYY');
0
 
Fletcher BurdineTableau Trainer & Consultant Sales Exec.Author Commented:
Good stuff to know Fo' Sho' Thank you all.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.