i am trying to create a database view to show records from table a but not exists in table b using left join
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2017 02:07 PM
Hi,
I have two tables with similar column names and I need to return records from the left table which are not found in the right table
I know how to write this in SQL Server but not familiar with ServiceNow Left Join any help would be really appreciated..
SELECT a.*
FROM TableA a
LEFT JOIN TableB b
ON b.col1 =a.col2
WHERE b.col1 is NULL
What i need in ServiceNow is
SELECT a.*
FROM Change_Request a
LEFT JOIN sysapproval_approver b
ON b.sysapproval =a.SYS_ID
WHERE b.sys_id is NULL
Please advise...
Thanks in advance..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-24-2017 11:22 AM
Just sent it along to you, let me know if you have any other questions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2024 10:29 AM
Hi,
An alternative:
Solved: how can i report on users that haven't logged an i... - ServiceNow Community
You can create a report for this purpose, this functionality is available in reporting.