Why does TOAD create Calculated column from SQL when repeating columns?

…and why does it tag it to the end of another table that is NOT related to the table I am using.

ie.

select d.first_name as christian_name,
d.first_name as firstname,
d.surname,

o.amount_due,

from (obligations o

inner join debtor d

on (d.entity_no = o.entity_no))

When I reverse engineer this query the designer converts the “firstname” column into a CALCULATED column BUT it places or tags this to the end of the obligations table and not the end of the debtor table as I would expect (logically speaking).

I was hoping TOAD would allow me to drag-drop the same columns into the designer as many times as I would want, like I can in Access and given them separate aliases.

Thanks Debbie, etc

Technically it doesn’t matter which table the calculated field is attached to. It has to be attached to one of the tables if it is to display in the columns at the bottom of the screen. It is just a visual thing. The reverse engineering code just adds to whatever is the first table.

RE: Multiple column adding. That is something we plan to add for TDA 3.0. I know it seems odd that you can’t do this. This is a design issue. It was built without that in mind and we have to do some large refactoring to be able to do this. We plan to find the time in the next major release.

Debbie

Hi Debbie,

re- multiple column adding…

Yes that would be good as it would allow me to port a lot of Access queries over to TOAD which have the same column name used more than once. However, to answer your question - I can do it, abeit via SQL…

ie:

select o.entity_no as debtor1, o.entity_no as debtor2 … etc

Thanks

I have been thinking about the original calculated field issue. In your example your column alises should not be turned into calculated fields. I made a sample query from what you show and I have no issues. There might be something else here. Can you send me your Query Builder file (*tsm) and corresponding SQL file with the complete SQL? I’d like to have look. You can send in private email if you like.

dpeabody@quest.com

P.S. What version of Toad for Data Analysts are you using? And why type of database are you connecting to?

PM’d and thread closed. Thanks