0

INNER JOIN

Is it possible to include the "INNER JOIN" in the NX ?

6 replies

null
    • Jorg
    • 5 yrs ago
    • Reported - view

    Hi, 

    That is already done, but the function is: 

     

    join()

     

    Best, Jörg

    • Sean
    • 5 yrs ago
    • Reported - view

    @Jörg,

     

    Would you please provide an example where it produces a virtual table. If that was possible, I would think you could use it in the View layout element or the function itself would return something similar to that. As far as I know, the join() function returns a string and you use it in a Formula field. To mimic an Inner Join I had to code it something like this...

     

    replace(join(for i in select Table1 do
    join((select Table2 where T2Text = i.T1Text).(T2Text + "  " + Number), "
    ")
    end, "
    "), "

    ", "
    ")

     

    I had to use the replace() function to remove the linefeed created for no matching records.

    • Kim_Schacht
    • 5 yrs ago
    • Reported - view

    In your manual:

     

    join(array,"separator") - Returns a string result with each element separated by a separator of your choice. That can also be a line break and/or a string.

    • Sean
    • 5 yrs ago
    • Reported - view

    I think the View layout element would be perfect for implementing the various JOINs.

    • Kim_Schacht
    • 5 yrs ago
    • Reported - view

    NO, this is not the task. I would like to extract a list with 2 tables that is not connected (relation). 

    • Sean
    • 5 yrs ago
    • Reported - view

    Who said anything about the tables being related? If you want a list view instead of a table view, then the solution I posted using the join() function in a formula field will work. Here's a diagram of the various JOINs, which one are you referring to?

     

    LEFT vs Right Outer Join in SQL

Content aside

  • 5 yrs agoLast active
  • 6Replies
  • 2305Views