Querying multiple table using TCL called proc

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Querying multiple table using TCL called proc

  • Creator
    Topic
  • #54319
    Mike Campbell
    Participant

      Cloverleaf 6.0, AIX operating system.

      I know that tcl has an issue with joins in a proc that is querying an external system.

    Viewing 5 reply threads
    • Author
      Replies
      • #80981
        Charlie Bursell
        Participant

          Huh?  I have used Tcl ODBC and SQLite to do all sorts of inner and outer joins with no problem.

          My guess is if using ODBC you are not setting up the columns correctly.  Look at the message, it says “Fetched Column Name is >ALIAS<"

        • #80982
          Jeff Dinsmore
          Participant

            I agree with Charlie.  We use joins all the time with no issue.

            A basic question:  Do you have any ODBC queries working from inside Cloveleaf, or is this your first attempt?

            Have you tried it without the join – just to see if that resolves the problem?

            Find a person_id value and use it directly in a simplified query – something like:

            SELECT alias from person_alias

                    WHERE active_ind = ‘1’

                      person_id = ‘yourTestPersonIdHere’

                      and alias_pool_cd = ‘33451’

                      and person_alias_type_cd = ‘4’

            Then, if that works, add the joins one at a time to see where it breaks.

            Have you run the query from a Cloverleaf Tcl shell?  Does it work there?

            Jeff Dinsmore
            Chesapeake Regional Healthcare

          • #80983
            Mike Campbell
            Participant

              Have several other queries that work just fine.  

              I’ll try it from a tcl shell.  Good idea.

            • #80984
              Jeff Dinsmore
              Participant

                Oops… left out an “and”

                SELECT alias from person_alias

                       WHERE active_ind = ‘1’

                         and person_id = ‘yourTestPersonIdHere’

                         and alias_pool_cd = ‘33451’

                         and person_alias_type_cd = ‘4’

                [/b]

                Jeff Dinsmore
                Chesapeake Regional Healthcare

              • #80985
                Mike Campbell
                Participant

                  Jeff, sorry for the ‘duh’ question.  When you say run the query from a Cloverleaf TCL chell, do you mean on the back end, like hcitcl?

                • #80986
                  Jeff Dinsmore
                  Participant

                    Correct.

                    Jeff Dinsmore
                    Chesapeake Regional Healthcare

                Viewing 5 reply threads
                • The forum ‘Cloverleaf’ is closed to new topics and replies.