# TDA

**URL:** <https://forums.toadworld.com/t/tda/6448>\
**Category:** Toad Data Point & Toad Intelligence Central\
**Created:** [January 21, 2011, 5:12pm UTC](https://forums.toadworld.com/t/tda/6448 "2011-01-21T17:12:50Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![shaimaa](https://avatars.discourse-cdn.com/v4/letter/s/43a26b/32.png) [@shaimaa](https://forums.toadworld.com/u/shaimaa)\
**Post date:** [January 21, 2011, 5:12pm UTC](https://forums.toadworld.com/t/tda/6448/1 "2011-01-21T17:12:50Z")

</div>

i have some questions if anyone can help me:

1-how i can get graphical report if i want to get report for example about ER diagram for database?

2-if i have different databases and i want to query info from different databases for example i want to query data exist in different databases…how can i make this?

3-if i have view and i want to see from which tables this view get data(i want to see that graphically as i see relations between tables?

---

<div class="post-metadata">

**Author:** ![Debbie\_Peabody](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/debbie_peabody/32/18_2.png) [@Debbie\_Peabody](https://forums.toadworld.com/u/Debbie_Peabody)\
**Post date:** [January 21, 2011, 7:08pm UTC](https://forums.toadworld.com/t/tda/6448/2 "2011-01-21T19:08:52Z")

</div>

1. The Er Diagram report seems to be broken in 2.7. Sorry CR81712.

2. See help files for hetrogenious queries. This is done by using the Query Builder. Connect to first datasource and drag table onto Query Builder. Then change connections to second datasource and drag on table. Add columns and run. This will join two disparate databases.

3. To graphically show view, point to view from the Object palette. Go to the script tab and copy the select statement. Put into editor and send to Query BUilder. The Query Builder will reverse engineer the SQL and show the table relationships in the top part of the Query Builder.

Debbie

---

<div class="post-metadata">

**Author:** ![shaimaa](https://avatars.discourse-cdn.com/v4/letter/s/43a26b/32.png) [@shaimaa](https://forums.toadworld.com/u/shaimaa)\
**Post date:** [January 21, 2011, 7:37pm UTC](https://forums.toadworld.com/t/tda/6448/3 "2011-01-21T19:37:00Z")

</div>

Thanks alot debbie for your reply  
about the third question i tried to follow your steps but it is not successful done and appear the attached screenshot..can you review it?

 ![reverse.png](https://global.discourse-cdn.com/quest/original/2X/3/3dc0d62498cb69a03dc0b8a0fff4a6d5b8db0ce4.png)

---

<div class="post-metadata">

**Author:** ![Debbie\_Peabody](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/debbie_peabody/32/18_2.png) [@Debbie\_Peabody](https://forums.toadworld.com/u/Debbie_Peabody)\
**Post date:** [January 21, 2011, 7:44pm UTC](https://forums.toadworld.com/t/tda/6448/4 "2011-01-21T19:44:30Z")

</div>

You would need to look on the Query tab to see more details. But the first thing I would check is being able to exectue it in the editor before you send it to the Query Builder. Does the Select statement execute? If not that needs to be resolved first. You may need to change the current schema if tables are not fully qualified. (Or add the schema name to the table.)

Debbie

---

<div class="post-metadata">

**Author:** ![shaimaa](https://avatars.discourse-cdn.com/v4/letter/s/43a26b/32.png) [@shaimaa](https://forums.toadworld.com/u/shaimaa)\
**Post date:** [January 21, 2011, 9:15pm UTC](https://forums.toadworld.com/t/tda/6448/5 "2011-01-21T21:15:07Z")

</div>

i tried test it in Editor before send it to query builder and it is executed … the below script for view which i want revers engineer for view which i want graphical diagram for this view and it’s relation with other tables

CREATE OR REPLACE FORCE VIEW “HR”.“EMP\_DETAILS\_VIEW”  
(  
“EMPLOYEE\_ID”,  
“JOB\_ID”,  
“MANAGER\_ID”,  
“DEPARTMENT\_ID”,  
“LOCATION\_ID”,  
“COUNTRY\_ID”,  
“FIRST\_NAME”,  
“LAST\_NAME”,  
“SALARY”,  
“COMMISSION\_PCT”,  
“DEPARTMENT\_NAME”,  
“JOB\_TITLE”,  
“CITY”,  
“STATE\_PROVINCE”,  
“COUNTRY\_NAME”,  
“REGION\_NAME”  
)  
AS  
SELECT e.employee\_id,  
e.job\_id,  
e.manager\_id,  
e.department\_id,  
d.location\_id,  
l.country\_id,  
e.first\_name,  
e.last\_name,  
e.salary,  
e.commission\_pct,  
d.department\_name,  
j.job\_title,  
l.city,  
l.state\_province,  
c.country\_name,  
r.region\_name  
FROM employees e,  
departments d,  
jobs j,  
locations l,  
countries c,  
regions r  
WHERE e.department\_id = d.department\_id  
AND d.location\_id = l.location\_id  
AND l.country\_id = c.country\_id  
AND c.region\_id = r.region\_id  
AND j.job\_id = e.job\_id  
WITH READ ONLY

---

<div class="post-metadata">

**Author:** ![Debbie\_Peabody](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/debbie_peabody/32/18_2.png) [@Debbie\_Peabody](https://forums.toadworld.com/u/Debbie_Peabody)\
**Post date:** [January 21, 2011, 9:24pm UTC](https://forums.toadworld.com/t/tda/6448/6 "2011-01-21T21:24:28Z")

</div>

e.job\_id,

e.manager\_id,

e.department\_id,

d.location\_id,

l.country\_id,

e.first\_name,

e.last\_name,

e.salary,

e.commission\_pct,

d.department\_name,

j.job\_title,

l.city,

l.state\_province,

c.country\_name,

r.region\_name

HR.departments d,

HR.jobs j,

HR.locations l,

HR.countries c,

HR.regions r

AND d.location\_id = l.location\_id

AND j.job\_id = e.job\_id

AND c.region\_id = r.region\_id

i woudl try this SQL. I have added the HR schema to each table and took off WITH READ ONLY.

SELECT e.employee\_id,FROM HR.employees e,WHERE e.department\_id = d.department\_idAND l.country\_id = c.country\_id

---

<div class="post-metadata">

**Author:** ![shaimaa](https://avatars.discourse-cdn.com/v4/letter/s/43a26b/32.png) [@shaimaa](https://forums.toadworld.com/u/shaimaa)\
**Post date:** [January 22, 2011, 4:14pm UTC](https://forums.toadworld.com/t/tda/6448/7 "2011-01-22T16:14:34Z")

</div>

Hi Debbie  
I tried added the HR schema to each table and took off WITH READ ONLY as you said but also appear the same message

---

<div class="post-metadata">

**Author:** ![Debbie\_Peabody](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/debbie_peabody/32/18_2.png) [@Debbie\_Peabody](https://forums.toadworld.com/u/Debbie_Peabody)\
**Post date:** [January 22, 2011, 5:36pm UTC](https://forums.toadworld.com/t/tda/6448/8 "2011-01-22T17:36:06Z")

</div>

That’s odd. It executes in the editor and reverse engineers for me. What version of TDA are you using? I am using 2.7. This SQL is not very complicated. I have listed below the only things that can cause it issues.

1. Not schema referencesing the tables.
2. Query Builder not recognizing non Ansi joins(there is a toggle button in the Query Builder. Older versions of TDA had to have this manually set.
3. The query uses synonyms that are not resolving.

Check those things. Then send to the QB again and go to the Query Tab. The red sqwiggle lines will tell you what part it is having problems with. I can reproduce the error when I take out the HR references.

Debbie

---

<div class="post-metadata">

**Author:** ![shaimaa](https://avatars.discourse-cdn.com/v4/letter/s/43a26b/32.png) [@shaimaa](https://forums.toadworld.com/u/shaimaa)\
**Post date:** [January 23, 2011, 6:01am UTC](https://forums.toadworld.com/t/tda/6448/9 "2011-01-23T06:01:51Z")

</div>

i am using version 2.7  
can you check the attached screenshot

 ![message.png](https://global.discourse-cdn.com/quest/original/2X/f/f28a7103a6079d6bccc442f7158cb2e448398469.png)

---

<div class="post-metadata">

**Author:** ![Debbie\_Peabody](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/debbie_peabody/32/18_2.png) [@Debbie\_Peabody](https://forums.toadworld.com/u/Debbie_Peabody)\
**Post date:** [January 23, 2011, 7:13pm UTC](https://forums.toadworld.com/t/tda/6448/10 "2011-01-23T19:13:17Z")

</div>

The Query Builde can only reverse engineer Select statements. The screenshot shows the whole View statement. Take the SQL I posted on Jan 21 and copy into an editor, then send to query builder. That should resovle things.

Debbie

---

<div class="post-metadata">

**Author:** ![shaimaa](https://avatars.discourse-cdn.com/v4/letter/s/43a26b/32.png) [@shaimaa](https://forums.toadworld.com/u/shaimaa)\
**Post date:** [January 24, 2011, 3:14am UTC](https://forums.toadworld.com/t/tda/6448/11 "2011-01-24T03:14:51Z")

</div>

but i want to reverse view to know which table is related with this view.  
can you advice me how to do that?

---

<div class="post-metadata">

**Author:** ![Debbie\_Peabody](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/debbie_peabody/32/18_2.png) [@Debbie\_Peabody](https://forums.toadworld.com/u/Debbie_Peabody)\
**Post date:** [January 24, 2011, 2:39pm UTC](https://forums.toadworld.com/t/tda/6448/12 "2011-01-24T14:39:26Z")

</div>

A view is the result set of an executed SQL statement. So if you use the SQL statement in the Query Builder it will give the tables, columns, and references that made up the view. Try using the attached Query Builder file.  
[HRViewTables.tsm](https://global.discourse-cdn.com/quest/original/2X/b/b6c6497bb3640a9f48952b26537d45cad502476c.tsm) (109 KB)
