Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. parent and child interbase query

parent and child interbase query

Scheduled Pinned Locked Moved Database
databasehelptutorialquestion
13 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P peter831

    hello there, can anyone plz tel me how to write a query to fetch all names of parents, children and subchildren in interbase? ex: School class1 21students class2 24students school2 class1 30students... plz i have it as a task at work plz help me :sigh: thank you.

    S Offline
    S Offline
    SeMartens
    wrote on last edited by
    #2

    Hi, I didn't get this. What is your table, how do the columns look like? That might be helpful to solve your problem. Regards Sebastian

    It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

    P 1 Reply Last reply
    0
    • S SeMartens

      Hi, I didn't get this. What is your table, how do the columns look like? That might be helpful to solve your problem. Regards Sebastian

      It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

      P Offline
      P Offline
      peter831
      wrote on last edited by
      #3

      well dear sebastian i have to display the table names in my ibexpert this is my first time trying to fetch table names and not fields using standard queries. i have to display in the 1st column the parent tables names and next to them in the second columns the children and the same for the subchildren for each parent..

      S 1 Reply Last reply
      0
      • P peter831

        well dear sebastian i have to display the table names in my ibexpert this is my first time trying to fetch table names and not fields using standard queries. i have to display in the 1st column the parent tables names and next to them in the second columns the children and the same for the subchildren for each parent..

        S Offline
        S Offline
        SeMartens
        wrote on last edited by
        #4

        Still didn't get this. Could you give an example?

        It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

        P 1 Reply Last reply
        0
        • S SeMartens

          Still didn't get this. Could you give an example?

          It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

          P Offline
          P Offline
          peter831
          wrote on last edited by
          #5

          mm.. lets see how to express this, i have a parent table called (types) in it i have many children and sub children tables. i need to display them in a query where in the 1st column the table types should appear then in the second column the children of that table should appear and in the 3rd column the children of the children tables should appears. ex: types(1st column) --------sales_unp(2nd column) --------sales ------------stock_flow(3rd column) ------------invoices_unp ------------invoices --------unordered_items_hdr(2nd column) ------------unordered_items(3rd column) ...

          S 1 Reply Last reply
          0
          • P peter831

            mm.. lets see how to express this, i have a parent table called (types) in it i have many children and sub children tables. i need to display them in a query where in the 1st column the table types should appear then in the second column the children of that table should appear and in the 3rd column the children of the children tables should appears. ex: types(1st column) --------sales_unp(2nd column) --------sales ------------stock_flow(3rd column) ------------invoices_unp ------------invoices --------unordered_items_hdr(2nd column) ------------unordered_items(3rd column) ...

            S Offline
            S Offline
            SeMartens
            wrote on last edited by
            #6

            So do you need a JOIN? Like: Select * from (types inner join sales on types.id = sales.typeid) inner join ...

            It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

            P 2 Replies Last reply
            0
            • S SeMartens

              So do you need a JOIN? Like: Select * from (types inner join sales on types.id = sales.typeid) inner join ...

              It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

              P Offline
              P Offline
              peter831
              wrote on last edited by
              #7

              to be honest i dont know what i need ... its logical to use joins if i want the children of tables to appear but to be honest its an alien query to me... i feel so weak in queries :sigh: but ofcourse i cant join all the tables there r so many! there must be a way to cite them all and display them in such way or else my boss wouldnt have told me to do so...

              S 1 Reply Last reply
              0
              • S SeMartens

                So do you need a JOIN? Like: Select * from (types inner join sales on types.id = sales.typeid) inner join ...

                It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

                P Offline
                P Offline
                peter831
                wrote on last edited by
                #8

                the SELECT * from table... would display the fields in that table.. this is not what i need. i need the table names only. not the fields in them.

                S 1 Reply Last reply
                0
                • P peter831

                  to be honest i dont know what i need ... its logical to use joins if i want the children of tables to appear but to be honest its an alien query to me... i feel so weak in queries :sigh: but ofcourse i cant join all the tables there r so many! there must be a way to cite them all and display them in such way or else my boss wouldnt have told me to do so...

                  S Offline
                  S Offline
                  SeMartens
                  wrote on last edited by
                  #9

                  Don't be shy about this. We were all beginners once :) Have a look at different tutorials about joins: http://www.w3schools.com/Sql/sql_join.asp[^] http://www.sql-tutorial.net/SQL-JOIN.asp[^] Joins about more than two table are nothing special, I know queries including up to twenty tables. Regards Sebastian

                  It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

                  1 Reply Last reply
                  0
                  • P peter831

                    the SELECT * from table... would display the fields in that table.. this is not what i need. i need the table names only. not the fields in them.

                    S Offline
                    S Offline
                    SeMartens
                    wrote on last edited by
                    #10

                    Ok, we are getting close. Normally DBMS store the information about tables in so-called system tables. For SQL Server you can get them by using the query "SELECT * FROM sys.tables"... http://msdn.microsoft.com/en-us/library/aa260604(SQL.80).aspx[^]

                    It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

                    P 1 Reply Last reply
                    0
                    • S SeMartens

                      Ok, we are getting close. Normally DBMS store the information about tables in so-called system tables. For SQL Server you can get them by using the query "SELECT * FROM sys.tables"... http://msdn.microsoft.com/en-us/library/aa260604(SQL.80).aspx[^]

                      It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

                      P Offline
                      P Offline
                      peter831
                      wrote on last edited by
                      #11

                      THANK GOD WE ARE UNDERSTANDING EACH OTHER.. ;) look the interbase (ibexpert) doesnt use sys.anything there must be some sort of other kywords for such database... this is my main issue. i have allready found sys.datatable_name...and stuff but the sys is not understood by ibexpert.. :( i tried to google it ... i found an answer in experts exchange.com but in order to view the answer i had to pay! and i dont have any credit cards on me... to be honest no matter if u could help me or not i am so thankful for your support! so thankful for taking time one me like this.

                      S 1 Reply Last reply
                      0
                      • P peter831

                        THANK GOD WE ARE UNDERSTANDING EACH OTHER.. ;) look the interbase (ibexpert) doesnt use sys.anything there must be some sort of other kywords for such database... this is my main issue. i have allready found sys.datatable_name...and stuff but the sys is not understood by ibexpert.. :( i tried to google it ... i found an answer in experts exchange.com but in order to view the answer i had to pay! and i dont have any credit cards on me... to be honest no matter if u could help me or not i am so thankful for your support! so thankful for taking time one me like this.

                        S Offline
                        S Offline
                        SeMartens
                        wrote on last edited by
                        #12

                        Scroll down to the bottom of the page (experts exchange). After all the advertising there will be the solution (don't know why they want to pay for this...).

                        It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

                        P 1 Reply Last reply
                        0
                        • S SeMartens

                          Scroll down to the bottom of the page (experts exchange). After all the advertising there will be the solution (don't know why they want to pay for this...).

                          It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

                          P Offline
                          P Offline
                          peter831
                          wrote on last edited by
                          #13

                          i cant belive the result was under my nose all the time and i didnt see it! :doh: thank you sebastian... ill never forget your support! if u got curious ... the thing i wanted is (you type in google fetch parent child tables interbase) you will get the title article (fetch parent child... uppercased u enter it and you will find what i wanted exactly..) thank you so much. hop this works.becos it says oracle ... thank you again :)

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups