H
I need help in converting below query in SQL to BODS task
INSERT INTO User_SPMapping
(Username,UserEmail,UserID, SPID, SPName, timestamp)
Select Username,UserEmail,UserID, SPID, SPName, timestamp
From Salesperson inner join User ON Username = SPName
Where SPID Not exists ( Select DWSPID From User_SPMapping)
Steps BODS
Step 1
Source tables User and Salesperson
----- Query Transform1 (got the matching records)
Step2
---------Query transform2 in Where clause ( NOT (Query1.SPID) IN
(User_SPMapping.DWSPIID )
--------------User_SPMapping
Step 3 : Step 2 result to Temp table
This is not working I am not getting result correctly from Step2 not exist
The Dataflow cannot do a NOT EXISTS using simply, native functionality. But you can make it do it by using the pushdown_sql() function. Code the entire NOT EXISTS expression and the subquery within the pushdown_sql() and it will work.