Add customer table field to an existing Database view

angelas
Tera Contributor

Hello- I have a custom table - u_aws that when triggered a survey goes out.

I have created a database view for reporting (u_report). 

One of the fields on that DB view is TriggerID: Number (number of the record on  u_aws).

I now need to grab a field from u_aws (queue_name) for the database view.

I'm struggling on how to write this where clause. I keep getting an error.

 

I'm adding u_aws with prefix dbaws to the database view.

What should my where clause be and should it join left?

 

Thank you!

 

 

2 ACCEPTED SOLUTIONS

Brad Bowman
Kilo Patron
Kilo Patron

This is difficult to follow without a picture of the existing working Database View, and with at least one custom table, but generally you only want a left join if you want to include all of the records from one of tables even if it doesn't have a record on the other table in the join.  The where clause needs to use a field on the new table that is a reference to a  one of the previous tables.

View solution in original post

It is possible to add to a where clause with &&, but it sounds like it would be best to add the where clause on the custom table record - aws#=triggerid

View solution in original post

5 REPLIES 5

It is possible to add to a where clause with &&, but it sounds like it would be best to add the where clause on the custom table record - aws#=triggerid