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...
RUA Volunteer2?Tableau Trainer & Consultant Sales Exec.Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RUA Volunteer2?Tableau 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....!
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;

---------- -
         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.
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook 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 ...
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');
RUA Volunteer2?Tableau Trainer & Consultant Sales Exec.Author Commented:
Good stuff to know Fo' Sho' Thank you all.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.