Creating a View with a OR in the INNER JOIN

Louis-Andre Morin shared this question 2 years ago
Answered

Hello guys,

Using the View Builder, is there a way to create a view with an 'OR' in an 'INNER JOIN' including an hardcoded value ?


Select a.1, a.2, a.3, b.4,

From a

Inner JOIN b

on( a.1 = b.1 and (a.2 = b.2 or a.2 = ' XXX ' ) )


Thanks


Louis-André

Comments (4)

photo
1

Hi Louis,


You can created nested logic by pressing the blue arrows to the left of the join logic as seen below:


ca1881624e80c526680ffb09d8451834


Does this work for you?


Regards,

Nathan

photo
1

About the hardcoded value instead of selecting a colunm ?


Inner JOIN b

on(

a.1 = b.1

and ( a.2 = b.2 or a.2 = ' XXX ' )

)

photo
1

Hi Louis,


My apologies, the hardcoded value will not be possible unless:


  • You create the entire view from free-hand SQL
  • Create a column with only this value in it to compare to.


Hopefully one of these will work for you here, and sorry for the inconvenience.


Regards,

Nathan

photo
1

Hi Louis,

I am going to set this ticket to closed for now, but if there is anything else I can do to help here, please just let me know and the case will be re-opened!


Regards,

Nathan