What is the syntax to concatenate two fields in a Database View Where clause?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2019 08:26 AM
What is the syntax to concatenate two fields in a Database View Where clause? I need a variable and a text string to form one side of the Join comparison.
Example Where clause: sysuser_email = abc_variable_field + "@test.com".
I know this is not the correct syntax. What is the correct syntax to concatenate the two fields?
Thanks a lot.
- Labels:
-
Reporting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2019 08:47 AM
Hi Doug,
Try this.
WHERE CONCAT(TRIM(customers.first_name), ' ', TRIM(customers.last_name)) LIKE '%John Smith%'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2019 11:06 AM
I'm tried this:
sysuser_email LIKE CONCAT(TRIM(cicomputer_u_last_login_name), '%@testing.com%')
and this:
sysuser_email = CONCAT(TRIM(cicomputer_u_last_login_name), '%@testing.com%')
but got syntax errors. I'm trying this statement in a database view Where clause.
See anything wrong?