# How to convert results of the sql database to final tables

**URL:** <https://forum.opentap.io/t/how-to-convert-results-of-the-sql-database-to-final-tables/475>\
**Category:** General\
**Created:** [October 17, 2021, 7:42am UTC](https://forum.opentap.io/t/how-to-convert-results-of-the-sql-database-to-final-tables/475 "2021-10-17T07:42:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![teder.ted](https://avatars.discourse-cdn.com/v4/letter/t/8491ac/32.png) [@teder.ted](https://forum.opentap.io/u/teder.ted)\
**Post date:** [October 17, 2021, 7:42am UTC](https://forum.opentap.io/t/how-to-convert-results-of-the-sql-database-to-final-tables/475/1 "2021-10-17T07:42:49Z")

</div>

Is there any document to help query all info in database and create final results like the .CSV file result?

I mean some pack of predefined queries like this:

```csharp
SELECT * FROM Result WHERE ResultSeriesID IN
(SELECT ResultSeriesID FROM ResultSeries WHERE ResultTypeID ==
(SELECT ResultTypeID FROM ResultType WHERE Name == "myTable"))

```

---

<div class="post-metadata">

**Author:** ![brennen\_direnzo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opentap.io/brennen_direnzo/32/6_2.png) [@brennen\_direnzo](https://forum.opentap.io/u/brennen_direnzo)\
**Post date:** [October 18, 2021, 2:12pm UTC](https://forum.opentap.io/t/how-to-convert-results-of-the-sql-database-to-final-tables/475/2 "2021-10-18T14:12:38Z")

</div>

@teder.ted we don’t since it is just standard SQL, so any tools you’d normally use will work.

The DB schema is published here:  
[https://doc.opentap.io/Developer%20Guide/Result%20Listener/#opentap-sql-database](https://doc.opentap.io/Developer%20Guide/Result%20Listener/#opentap-sql-database)

Someone on here may be able to help you with more specifics, but I’m curious would just having both the SQL and CSV Result Listeners enabled at the same time meet your needs rather than trying to convert to CSV?

If you are using PathWave Test Automation you are also able to export to CSV from the Results Viewer.

---

<div class="post-metadata">

**Author:** ![robert.lamoreaux](https://avatars.discourse-cdn.com/v4/letter/r/71c47a/32.png) [@robert.lamoreaux](https://forum.opentap.io/u/robert.lamoreaux)\
**Post date:** [September 10, 2025, 1:39pm UTC](https://forum.opentap.io/t/how-to-convert-results-of-the-sql-database-to-final-tables/475/3 "2025-09-10T13:39:41Z")

</div>

I know this is an old post, but I have an SQL scrip to pull out test runs into a table listing all the steps executed and their results. It should work for any SQL tap database although there are some things specific to add-ons created for our particular scenario.

I attached the script here.

[GetPlanRunInfo.sql.txt](https://forum.opentap.io/uploads/short-url/mfLSqhkHPUT2jhhTozGF8xsJ4qM.txt) (6.4 KB)
