Topic
  • 5 replies
  • Latest Post - ‏2013-05-02T00:32:13Z by DonaldN
Wolfgang Uhr
Wolfgang Uhr
3 Posts

Pinned topic Sql Relationship Table

‏2013-04-26T10:33:06Z |

Hello

I've to click together a query of a database. How can I get the basic info of a relation ship table?

Thanks for ervery help

Best regards

Wolfgang

  • DonaldN
    DonaldN
    287 Posts

    Re: Sql Relationship Table

    ‏2013-04-30T02:57:22Z  

    Your questions is too broad. If you know nothing or little about a table, why do you want to run a query directly against it? Please be specific and clarify what you want to achieve.

  • Wolfgang Uhr
    Wolfgang Uhr
    3 Posts

    Re: Sql Relationship Table

    ‏2013-04-30T19:25:07Z  
    • DonaldN
    • ‏2013-04-30T02:57:22Z

    Your questions is too broad. If you know nothing or little about a table, why do you want to run a query directly against it? Please be specific and clarify what you want to achieve.

    Hello Donald


    It seems that I've used the wrong word for the translation.
    http://blog.dimaj.net/2011/07/query-clearquest-via-sql

    Quote:
    Before we begin, there are couple of things you will need:
    [...]
    3) Table structure (ask your ClearQuest administrator). This is used to construct your queries.

    Really, it is not my plan to install an odbc client for a CQ-Database, so the topic of the link isn't the topic of my question.
    I need that thing - the author speaks about the "table structure" - which you need to create queries.

    Best regards

    Wolfgang

  • DonaldN
    DonaldN
    287 Posts

    Re: Sql Relationship Table

    ‏2013-05-01T00:16:33Z  

    Hello Donald


    It seems that I've used the wrong word for the translation.
    http://blog.dimaj.net/2011/07/query-clearquest-via-sql

    Quote:
    Before we begin, there are couple of things you will need:
    [...]
    3) Table structure (ask your ClearQuest administrator). This is used to construct your queries.

    Really, it is not my plan to install an odbc client for a CQ-Database, so the topic of the link isn't the topic of my question.
    I need that thing - the author speaks about the "table structure" - which you need to create queries.

    Best regards

    Wolfgang

    Hi Wolfgang,

    Since you mentioned about ClearQuest, I presume you have ClearQuest installed. In this case you can use the "pdsql" tool in place of the "sqlplus" tool mentioned in the blog.

    Once you log on to the ClearQuest database using "pdsql", the command "tables;" will give you a list of all tables, while "columns <table_name>;" will give you a list of the columns in the given table, which I understand to be the "table structure" in your word.

    For more information about "pdsql", see the below technote.

    http://www-01.ibm.com/support/docview.wss?uid=swg21145079

  • Wolfgang Uhr
    Wolfgang Uhr
    3 Posts

    Re: Sql Relationship Table

    ‏2013-05-01T07:44:22Z  
    • DonaldN
    • ‏2013-05-01T00:16:33Z

    Hi Wolfgang,

    Since you mentioned about ClearQuest, I presume you have ClearQuest installed. In this case you can use the "pdsql" tool in place of the "sqlplus" tool mentioned in the blog.

    Once you log on to the ClearQuest database using "pdsql", the command "tables;" will give you a list of all tables, while "columns <table_name>;" will give you a list of the columns in the given table, which I understand to be the "table structure" in your word.

    For more information about "pdsql", see the below technote.

    http://www-01.ibm.com/support/docview.wss?uid=swg21145079

    Hi Donald

    Thanks for the link

    Is there any command for a two dimesional output?

    http://msdn.microsoft.com/de-de/library/ms188251%28v=sql.90%29.aspx

    Best regards

    Wolfgang

  • DonaldN
    DonaldN
    287 Posts

    Re: Sql Relationship Table

    ‏2013-05-02T00:32:13Z  

    Hi Donald

    Thanks for the link

    Is there any command for a two dimesional output?

    http://msdn.microsoft.com/de-de/library/ms188251%28v=sql.90%29.aspx

    Best regards

    Wolfgang

    Hi Wolfgang,

    It appears that you try to get the Entity-Relationship diagram of the database. In this case, the tool that I mentioned does not provide such functionality. You can find some free ER tools online or look into IBM's offering - Rational System Architect. Note that the normal practice is to draw the diagram first and then generate the data structure based on the model, but you try to do the reverse. I personally don't know how well any of the ER tools works in this regard.

    One way may help you understand the relationship among ClearQuest tables is like this:

    1. Launch the ClearQuest Windows client.

    2. Create a query that returns exactly or similar results that you want.

    3. Choose menu View > View SQL pane and you will see the resulted SQL statement.

    If you examine the said SQL statement carefully, it would not be difficult for you to figure out the table relationships.

    P.S. No ER tools can reveal all the relationships among ClearQuest tables, since the relationship is more than just primary keys and foreign keys.